| Crates.io | textmate-scope-selector-peg |
| lib.rs | textmate-scope-selector-peg |
| version | 2.0.0 |
| created_at | 2024-12-04 17:39:49.30707+00 |
| updated_at | 2024-12-07 19:43:57.943414+00 |
| 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 |
| size | 27,868 |
textmate-scope-selector-pegPerformant port of the Textmate scope selector parser from JavaScript to Rust.
The original parser grammar (PegJS) lives at atom/first-mate.
selector.matchesThe rust-peg parser was benchmarked for matching scopes against the following input:
source.matlab -comment -entity -support -string -variable -interpolation -source.shellsource.matlab meta.class.matlab meta.class.declaration.matlab entity.name.type.class.matlabThe Rust crates parser produced speeds of $7.47ns/iter$, reduced from $31.8ns/iter$ in the peggy parser.
selector.get_prefixThe 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.markdownThe Rust crate's parser produced speeds of $19.78ns/iter$.