Skip to content

Commit

Permalink
chore: update tree-sitter-devicetree dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-prusov committed Oct 30, 2024
1 parent 91d1a48 commit 6ed4125
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ streaming-iterator = "0.1.9"
tokio = { version = "1.40.0", features = [ "full" ] }
tower-lsp = "0.20.0"
tree-sitter = "0.24.3"
tree-sitter-devicetree = "0.11.1"
tree-sitter-devicetree = "0.12.1"
walkdir = { version = "2.5.0", optional = true }
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl LanguageServer for Backend {
};
let mut parser = Parser::new();
parser
.set_language(&tree_sitter_devicetree::language())
.set_language(&tree_sitter_devicetree::LANGUAGE.into())
.unwrap();
let tree = parser.parse(&text, None).unwrap();
if let Some(node) = tree
Expand Down Expand Up @@ -199,7 +199,7 @@ impl LanguageServer for Backend {

let mut parser = Parser::new();
parser
.set_language(&tree_sitter_devicetree::language())
.set_language(&tree_sitter_devicetree::LANGUAGE.into())
.unwrap();
let tree = parser.parse(&text, None).unwrap();
if let Some(node) = tree
Expand Down Expand Up @@ -234,7 +234,7 @@ impl LanguageServer for Backend {
};
let mut parser = Parser::new();
parser
.set_language(&tree_sitter_devicetree::language())
.set_language(&tree_sitter_devicetree::LANGUAGE.into())
.unwrap();
let tree = parser.parse(&text, None).unwrap();

Expand Down Expand Up @@ -267,7 +267,7 @@ impl LanguageServer for Backend {

let mut parser = Parser::new();
parser
.set_language(&tree_sitter_devicetree::language())
.set_language(&tree_sitter_devicetree::LANGUAGE.into())
.unwrap();
let tree = parser.parse(&text, None).unwrap();
if let Some(node) = tree
Expand Down
10 changes: 5 additions & 5 deletions src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Workspace {
let mut cursor = QueryCursor::new();

let q = Query::new(
&tree_sitter_devicetree::language(),
&tree_sitter_devicetree::LANGUAGE.into(),
"(node label: (identifier)@id)",
)
.unwrap();
Expand All @@ -78,7 +78,7 @@ impl Workspace {
pub fn process_includes(&self, tree: &Tree, uri: &Url, text: &str) -> Vec<Url> {
let mut cursor = QueryCursor::new();
let q = Query::new(
&tree_sitter_devicetree::language(),
&tree_sitter_devicetree::LANGUAGE.into(),
"[
(dtsi_include path: (string_literal)@id)
(preproc_include path: (string_literal)@id)
Expand Down Expand Up @@ -117,7 +117,7 @@ impl Workspace {
let mut cursor = QueryCursor::new();

let q = Query::new(
&tree_sitter_devicetree::language(),
&tree_sitter_devicetree::LANGUAGE.into(),
"(reference label: (identifier)@id)",
)
.unwrap();
Expand All @@ -141,7 +141,7 @@ impl Workspace {
let mut cursor = QueryCursor::new();

let q = Query::new(
&tree_sitter_devicetree::language(),
&tree_sitter_devicetree::LANGUAGE.into(),
"[
(preproc_def name: (identifier)@name value: (preproc_arg)@id)
(preproc_function_def name: (identifier)@name parameters: (preproc_params) value: (preproc_arg)@id)
Expand Down Expand Up @@ -199,7 +199,7 @@ impl Workspace {

let mut parser = Parser::new();
parser
.set_language(&tree_sitter_devicetree::language())
.set_language(&tree_sitter_devicetree::LANGUAGE.into())
.unwrap();
let tree = parser.parse(&text, None).unwrap();

Expand Down

0 comments on commit 6ed4125

Please sign in to comment.