1 unstable release
0.0.1 | Sep 22, 2023 |
---|
#9 in #dust
53KB
1.5K
SLoC
tree-sitter-dust
Tree sitter implementation for the Dust programming language.
This repository is used to enable sytax highlighting and other developer-friendly features for Dust. To use this repository with Helix, clone it and add the following to your languages.toml
file.
[[language]]
name = "dust"
scope = "source.dust"
injection-regex = "dust"
file-types = ["ds", "dust"]
roots = [".git"]
comment-token = "#"
grammar = "dust"
[[grammar]]
name = "dust"
source.path = "/path/to/tree-sitter-dust"
lib.rs
:
This crate provides Dust 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_Dust::language()).expect("Error loading Dust grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.8–4MB
~76K SLoC