Merge pull request #107197 from Profpatsch/tree-sitter-fixes
Tree sitter fixes
This commit is contained in:
commit
70c07155d0
@ -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
|
||||
@ -60,10 +62,6 @@ in rustPlatform.buildRustPackage {
|
||||
# needed for the tests
|
||||
rm -rf test/fixtures/grammars
|
||||
ln -s ${grammars} test/fixtures/grammars
|
||||
|
||||
# These functions do not appear in the source code
|
||||
sed -i /_ts_query_context/d lib/binding_web/exports.json
|
||||
sed -i /___assert_fail/d lib/binding_web/exports.json
|
||||
'';
|
||||
|
||||
# Compile web assembly with emscripten. The --debug flag prevents us from
|
||||
|
@ -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
Block a user