tree-sitter/script
Alex Pinkus 8fadf18655 Expand regex support to include emojis and binary ops
The `Emoji` property alias is already present, but the actual property
is not available since it lives in a new file. This adds that file to
the `generate-unicode-categories-json`.

The `emoji-data` file follows the same format as the ones we already
consume in `generate-unicode-categories-json`, so adding emoji support
is fairly easy. his, grammars would need to hard-code a set of
unicode ranges in their own regex. The Javascript library `emoji-regex`
cannot be used because of #451.

For unclear reasons, the characters #, *, and 0-9 are marked as
`Emoji=Yes` by `emoji-data.txt`. Because of this, a grammar that wishes
to use emojis is likely to want to exclude those characters. For that
reason, this change also adds support for binary operations in regexes,
e.g. `[\p{Emoji}&&[^#*0-9]]`.

Lastly (and perhaps controversially), this change introduces new
variables available at grammar compile time, for the major, minor, and
patch versions of the tree-sitter CLI used to compile the grammar. This
will allow grammars to conditionally adopt these new regex features
while remaining backward compatible with older versions of the CLI.
Without this part of the change, grammar authors who do not precompile
and check-in their `grammar.json` would need to wait for downstream
systems to adopt a newer tree-sitter CLI version before they could begin
to use these features.
2022-02-19 11:41:36 -08:00
..
util Rename lib.sh -> scan-build.sh 2017-07-06 10:32:41 -07:00
benchmark Only build the CLI crate when running benchmarks 2021-02-05 11:57:34 -08:00
benchmark.cmd Only build the CLI crate when running benchmarks 2021-02-05 11:57:34 -08:00
build-fuzzers Remove build-lib script, recommend make 2020-05-12 16:28:26 -07:00
build-wasm Put emscripten-version file in cli directory 2021-09-03 13:57:45 -07:00
check-mallocs Move parser generation code in to 'generate' module within CLI crate 2019-01-07 10:23:01 -08:00
fetch-emscripten Put emscripten-version file in cli directory 2021-09-03 13:57:45 -07:00
fetch-fixtures Allow symbols to be used in precedence lists 2021-03-03 13:11:05 -08:00
fetch-fixtures.cmd Allow symbols to be used in precedence lists 2021-03-03 13:11:05 -08:00
generate-bindings Remove unnecessary types from binding.rs 2021-12-09 21:02:15 -08:00
generate-fixtures Add --abi flag to generate command, generate version 13 by default 2022-01-17 14:50:47 -08:00
generate-fixtures-wasm Use new emscripten when building with docker 2020-12-01 11:04:06 -08:00
generate-fixtures.cmd Add --abi flag to generate command, generate version 13 by default 2022-01-17 14:50:47 -08:00
generate-unicode-categories-json Expand regex support to include emojis and binary ops 2022-02-19 11:41:36 -08:00
generate-wasm-exports-list Make scripts work when repo path contains spaces 2019-08-12 15:13:41 -07:00
heap-profile Add heap-profiling script 2020-10-23 13:20:57 -07:00
reproduce Build fuzzer in 'halt' and 'recover' modes 2018-03-02 10:13:13 -08:00
run-fuzzer Allow extra libFuzzer arguments to script/reproduce 2018-03-12 12:54:06 -07:00
serve-docs wasm: Fix typo in Node.typeId 2020-02-21 17:06:07 -08:00
show-symbol-sizes Add script for dumping the sizes of each symbol in a dynamic library 2019-06-16 11:17:53 -07:00
test Restructure test suite's allocation recording so that tests can run in parallel 2021-10-11 17:24:37 -07:00
test-wasm Reorganize language bindings 2019-05-07 10:41:49 -07:00
test.cmd Simplify setup for enabling/disabling allocation recording in the C lib 2020-12-02 15:35:13 -08:00
version In version script, add 'v' prefix to version tags 2021-02-11 16:16:19 -08:00