Merge pull request #107197 from Profpatsch/tree-sitter-fixes

Tree sitter fixes
This commit is contained in:
Gabriel Ebner 2020-12-19 13:50:19 +01:00 committed by GitHub
commit 70c07155d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -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

View File

@ -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
}: