tree-sitter: split arguments in library.nix & document
This commit is contained in:
parent
5907bcadfa
commit
cf81745404
|
@ -41,8 +41,10 @@ let
|
|||
|
||||
builtGrammars = let
|
||||
change = name: grammar:
|
||||
callPackage ./library.nix {
|
||||
language = name; inherit version; source = fetchGrammar grammar;
|
||||
callPackage ./library.nix {} {
|
||||
language = name;
|
||||
inherit version;
|
||||
source = fetchGrammar grammar;
|
||||
};
|
||||
in
|
||||
# typescript doesn't have parser.c in the same place as others
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{ stdenv
|
||||
, language
|
||||
, tree-sitter
|
||||
}:
|
||||
|
||||
# Build a parser grammar and put the resulting shared object in `$out/parser`
|
||||
|
||||
{
|
||||
# language name
|
||||
language
|
||||
# version of tree-sitter
|
||||
, version
|
||||
# source for the language grammar
|
||||
, source
|
||||
}:
|
||||
|
||||
|
|
Loading…
Reference in New Issue