From e15c7befb15305fd67e0f22605c439cf6d602ab9 Mon Sep 17 00:00:00 2001 From: OmarTawfik <15987992+OmarTawfik@users.noreply.github.com> Date: Thu, 23 Nov 2023 11:56:43 -0800 Subject: [PATCH] rename `Cursor::path_rule_nodes` to `ancestors` matching the Rust API --- crates/codegen/parser/runtime/src/napi/napi_cursor.rs | 2 +- .../outputs/cargo/crate/src/generated/napi/napi_cursor.rs | 2 +- .../outputs/npm/crate/src/generated/napi/napi_cursor.rs | 2 +- crates/solidity/outputs/npm/package/src/generated/index.d.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/codegen/parser/runtime/src/napi/napi_cursor.rs b/crates/codegen/parser/runtime/src/napi/napi_cursor.rs index 153290358f..9b0966e484 100644 --- a/crates/codegen/parser/runtime/src/napi/napi_cursor.rs +++ b/crates/codegen/parser/runtime/src/napi/napi_cursor.rs @@ -63,7 +63,7 @@ impl Cursor { } #[napi(ts_return_type = "Array")] - pub fn path_rule_nodes(&self, env: Env) -> Vec { + pub fn ancestors(&self, env: Env) -> Vec { self.0 .ancestors() .map(|rust_rule_node| rust_rule_node.to_js(&env)) diff --git a/crates/solidity/outputs/cargo/crate/src/generated/napi/napi_cursor.rs b/crates/solidity/outputs/cargo/crate/src/generated/napi/napi_cursor.rs index 5cc54070d1..e012a2fc38 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/napi/napi_cursor.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/napi/napi_cursor.rs @@ -65,7 +65,7 @@ impl Cursor { } #[napi(ts_return_type = "Array")] - pub fn path_rule_nodes(&self, env: Env) -> Vec { + pub fn ancestors(&self, env: Env) -> Vec { self.0 .ancestors() .map(|rust_rule_node| rust_rule_node.to_js(&env)) diff --git a/crates/solidity/outputs/npm/crate/src/generated/napi/napi_cursor.rs b/crates/solidity/outputs/npm/crate/src/generated/napi/napi_cursor.rs index 5cc54070d1..e012a2fc38 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/napi/napi_cursor.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/napi/napi_cursor.rs @@ -65,7 +65,7 @@ impl Cursor { } #[napi(ts_return_type = "Array")] - pub fn path_rule_nodes(&self, env: Env) -> Vec { + pub fn ancestors(&self, env: Env) -> Vec { self.0 .ancestors() .map(|rust_rule_node| rust_rule_node.to_js(&env)) diff --git a/crates/solidity/outputs/npm/package/src/generated/index.d.ts b/crates/solidity/outputs/npm/package/src/generated/index.d.ts index f25b3ab4e8..0bd51680db 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -532,7 +532,7 @@ export namespace cursor { node(): cst.RuleNode | cst.TokenNode; get textOffset(): text_index.TextIndex; get textRange(): text_index.TextRange; - pathRuleNodes(): Array; + ancestors(): Array; goToNext(): boolean; goToNextNonDescendent(): boolean; goToPrevious(): boolean;