6 releases
new 0.3.2 | Dec 2, 2024 |
---|---|
0.3.1 | Sep 28, 2024 |
0.2.0 | Apr 8, 2024 |
0.1.1 | Dec 4, 2023 |
0.1.0 | Mar 14, 2023 |
#35 in Parser tooling
8,658 downloads per month
Used in 4 crates
13MB
429K
SLoC
tree-sitter-elixir
Elixir grammar for tree-sitter.
Ready for production. Currently used by GitHub itself for source code highlighting and code navigation.
Development
See the docs for more details.
lib.rs
:
This crate provides Elixir 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 = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_elixir::LANGUAGE;
parser
.set_language(&language.into())
.expect("Error loading Elixir parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());