Crate tree_sitter_solidity[−][src]
Expand description
This crate provides Solidity language support for the tree-sitter parsing library.
The bindings in https://github.com/tree-sitter/tree-sitter-javascript/blob/master/bindings/rust were used as a template for the tree-sitter-solidity rust bindings.
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_Solidity::language()).expect("Error loading Solidity grammar"); let tree = parser.parse(code, None).unwrap();
Constants
GRAMMAR | The source of the Solidity tree-sitter grammar description. |
HIGHLIGHTS_QUERY | |
NODE_TYPES | The content of the |
Functions
language | Get the tree-sitter Language for this grammar. |