Expand description
Tree-sitter parser for the .actions file format.
§Parsing
Use the LANGUAGE constant to parse .actions files:
let code = "[ ] Buy milk\n!1\n";
let mut parser = tree_sitter::Parser::new();
parser
.set_language(&tree_sitter_actions::LANGUAGE.into())
.expect("Error loading Actions parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());Constants§
- FORMATTING_
QUERY - The formatting query for this grammar.
- HIGHLIGHTS_
QUERY - The syntax highlighting query for this grammar.
- INDENTS_
QUERY - The indentation query for this grammar.
- LANGUAGE
- The tree-sitter
LanguageFnfor this grammar. - NODE_
TYPES - The content of the
node-types.jsonfile for this grammar.