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