From a20a47859b7f48dd8e0835118743b513ae4a2e35 Mon Sep 17 00:00:00 2001 From: Alex Pinkus Date: Sat, 8 Oct 2022 14:43:48 -0700 Subject: [PATCH] Build ABI 14 as well as 13 when generating the grammar --- scripts/write-generated-grammar.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/write-generated-grammar.sh b/scripts/write-generated-grammar.sh index 2bd06c2..5098a83 100755 --- a/scripts/write-generated-grammar.sh +++ b/scripts/write-generated-grammar.sh @@ -19,6 +19,13 @@ git reset HEAD@{1} npm install npm run test-ci +# Now that we know the parser works, build for ABI 14 (but don't use this as the default because +# it's not compatible everywhere). +mv src/parser.c src/parser_abi13.c +npx tree-sitter generate --abi 14 +mv src/parser.c src/parser_abi14.c +mv src/parser_abi13.c src/parser.c + # Commit specific generated files, attributing the changes to the primary maintainer of this # grammar. Notably, we do not commit the `.o` files generated during the build, just the source. git config --local user.email alex.pinkus@gmail.com