Skip to main content

Crate tree_sitter_actions

Crate tree_sitter_actions 

Source
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 LanguageFn for this grammar.
NODE_TYPES
The content of the node-types.json file for this grammar.