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
The source of the Solidity tree-sitter grammar description.
The content of the node-types.json
file for this grammar.