#parser #incremental #plymouth-script

tree-sitter-plymouth-script

plymouth-script grammar for the tree-sitter parsing library

1 unstable release

0.1.0 Jun 21, 2022

#404 in Text editors

MIT license

260KB
10K SLoC

C 10K SLoC JavaScript 346 SLoC // 0.0% comments Rust 31 SLoC // 0.5% comments

tree-sitter-plymouth-script

Plymouth script grammar for tree-sitter.

Many of the syntax parsing rules were adapted from tree-sitter-javascript.

References


lib.rs:

This crate provides plymouth_script language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_plymouth_script::language()).expect("Error loading plymouth_script grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~71K SLoC