From 2f2e4160316b3c60a8973950fa3968afbff8a827 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 13 Jul 2023 11:39:33 -0400 Subject: [PATCH] chore: update Rust bindings --- lib/binding_rust/bindings.rs | 6 +++++- lib/binding_rust/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/binding_rust/bindings.rs b/lib/binding_rust/bindings.rs index 66406adc..a3de6a4a 100644 --- a/lib/binding_rust/bindings.rs +++ b/lib/binding_rust/bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.65.1 */ +/* automatically generated by rust-bindgen 0.66.1 */ pub type TSSymbol = u16; pub type TSFieldId = u16; @@ -278,6 +278,10 @@ extern "C" { #[doc = " Get the node's type as a numerical id."] pub fn ts_node_symbol(arg1: TSNode) -> TSSymbol; } +extern "C" { + #[doc = " Get the node's language."] + pub fn ts_node_language(arg1: TSNode) -> *const TSLanguage; +} extern "C" { #[doc = " Get the node's start byte."] pub fn ts_node_start_byte(arg1: TSNode) -> u32; diff --git a/lib/binding_rust/lib.rs b/lib/binding_rust/lib.rs index caa5af44..5bed0817 100644 --- a/lib/binding_rust/lib.rs +++ b/lib/binding_rust/lib.rs @@ -839,9 +839,9 @@ impl<'tree> Node<'tree> { } /// Get the [Language] that was used to parse this node's syntax tree. - #[doc(alias = "ts_tree_language")] + #[doc(alias = "ts_node_language")] pub fn language(&self) -> Language { - Language(unsafe { ffi::ts_tree_language(self.0.tree) }) + Language(unsafe { ffi::ts_node_language(self.0) }) } /// Check if this node is *named*.