Previously the rule names could not begin with an uppercase M or U
because the test output formatter assumed that they represent special
tokens: MISSING or UEXPECTED.
Fixes#1940.
Previously, when an included range started or ended *inside* of
an edit, that range did not get updated correctly.
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Make it possible to pass port and address via
pair of environmental variables TREE_SITTER_PLAYGROUND_PORT
and TREE_SITTER_PLAYGROUND_ADDR, respectively.
Signed-off-by: Pavel Odvody <pavel@redhat.com>
* Allow iterations to be specified via an env var
* Randomly decide the edit count, with a maximum
specified via an env var.
* Instead of separate env vars for starting seed + trial, just accept a seed
* Remove some noisy output
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.