diff --git a/Cargo.lock b/Cargo.lock index 0d98679..f7400fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -845,12 +845,12 @@ dependencies = [ [[package]] name = "tree-sitter-devicetree" -version = "0.11.1" +version = "0.12.1" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "5d5616332bd1bf2de9d09518a0a132f4ba21bcf56a32754076cc2f9a7aee154d" +checksum = "5316f2424900931de827a78cd2d46d86b0bb30ff1f8b497f2219650cc9af3afb" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4203c28..f0b21c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/src/main.rs b/src/main.rs index 1f2da1d..19ca020 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 @@ -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 @@ -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(); @@ -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 diff --git a/src/workspace.rs b/src/workspace.rs index 1007e7c..08fa422 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -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(); @@ -78,7 +78,7 @@ impl Workspace { pub fn process_includes(&self, tree: &Tree, uri: &Url, text: &str) -> Vec { 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) @@ -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(); @@ -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) @@ -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();