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.
78 lines
1.4 KiB
TOML
78 lines
1.4 KiB
TOML
[package]
|
|
name = "tree-sitter-cli"
|
|
description = "CLI tool for developing, testing, and using Tree-sitter parsers"
|
|
version = "0.20.2"
|
|
authors = ["Max Brunsfeld <maxbrunsfeld@gmail.com>"]
|
|
edition = "2018"
|
|
license = "MIT"
|
|
readme = "README.md"
|
|
keywords = ["incremental", "parsing"]
|
|
categories = ["command-line-utilities", "parsing"]
|
|
repository = "https://github.com/tree-sitter/tree-sitter"
|
|
|
|
[[bin]]
|
|
name = "tree-sitter"
|
|
path = "src/main.rs"
|
|
|
|
[[bench]]
|
|
name = "benchmark"
|
|
harness = false
|
|
|
|
[dependencies]
|
|
ansi_term = "0.12"
|
|
anyhow = "1.0"
|
|
atty = "0.2"
|
|
clap = "2.32"
|
|
difference = "2.0"
|
|
dirs = "3.0"
|
|
glob = "0.3.0"
|
|
html-escape = "0.2.6"
|
|
indexmap = "1"
|
|
lazy_static = "1.2.0"
|
|
regex = "1"
|
|
regex-syntax = "0.6.4"
|
|
rustc-hash = "1"
|
|
semver = "1.0"
|
|
serde = { version = "1.0.130", features = ["derive"] }
|
|
smallbitvec = "2.5.1"
|
|
tiny_http = "0.8"
|
|
walkdir = "2.3"
|
|
webbrowser = "0.5.1"
|
|
which = "4.1.0"
|
|
|
|
[dependencies.tree-sitter]
|
|
version = "0.20"
|
|
path = "../lib"
|
|
|
|
[dependencies.tree-sitter-config]
|
|
version = "0.19.0"
|
|
path = "config"
|
|
|
|
[dependencies.tree-sitter-highlight]
|
|
version = "0.20"
|
|
path = "../highlight"
|
|
|
|
[dependencies.tree-sitter-loader]
|
|
version = "0.20"
|
|
path = "loader"
|
|
|
|
[dependencies.tree-sitter-tags]
|
|
version = "0.20"
|
|
path = "../tags"
|
|
|
|
[dependencies.serde_json]
|
|
version = "1.0"
|
|
features = ["preserve_order"]
|
|
|
|
[dependencies.log]
|
|
version = "0.4.6"
|
|
features = ["std"]
|
|
|
|
[dev-dependencies]
|
|
rand = "0.8"
|
|
tempfile = "3"
|
|
pretty_assertions = "0.7.2"
|
|
ctor = "0.1"
|
|
|
|
[build-dependencies]
|
|
toml = "0.5"
|