2 stable releases
1.0.1 | Dec 18, 2023 |
---|---|
1.0.0 | Jul 31, 2023 |
#210 in Text editors
10,883 downloads per month
110KB
4K
SLoC
tree-sitter-gomod
tree-sitter grammar for go.mod files.
Status
The grammar is fairly small, and has been working well for highlighting for me. I expect it to evolve slightly to better fit tree-sitter best practices, but there shouldn't be anything major.
lib.rs
:
This crate provides gomod 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_gomod::language()).expect("Error loading gomod grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.7–4MB
~72K SLoC