Crates.io | textmate-scope-selector-peg |
lib.rs | textmate-scope-selector-peg |
version | |
source | src |
created_at | 2024-12-04 17:39:49.30707 |
updated_at | 2024-12-07 19:43:57.943414 |
description | Textmate scope selector implementation as a PEG (parser grammar) in Rust |
homepage | |
repository | https://github.com/vsce-toolroom/textmate-scope-selector-peg |
max_upload_size | |
id | 1472338 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
textmate-scope-selector-peg
Performant port of the Textmate scope selector parser from JavaScript to Rust.
The original parser grammar (PegJS) lives at atom/first-mate.
selector.matches
The rust-peg
parser was benchmarked for matching scopes against the following input:
source.matlab -comment -entity -support -string -variable -interpolation -source.shell
source.matlab meta.class.matlab meta.class.declaration.matlab entity.name.type.class.matlab
The Rust crates parser produced speeds of $7.47ns/iter$, reduced from $31.8ns/iter$ in the peggy
parser.
selector.get_prefix
The rust-peg
parser was benchmarked for prefix matching against the following input:
L:text.html.markdown - (comment, string, meta.paragraph.markdown, markup.*.block.markdown)
text.html.markdown meta.paragraph.markdown
The Rust crate's parser produced speeds of $19.78ns/iter$.