Skip to content

Commit

Permalink
rename Cursor::path_rule_nodes to ancestors matching the Rust API (
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik authored Nov 28, 2023
1 parent 1a47349 commit daea4b7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-jobs-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/slang": minor
---

rename `Cursor`'s `pathRuleNodes()` to `ancestors()` in the NodeJS API.
2 changes: 1 addition & 1 deletion crates/codegen/parser/runtime/src/napi/napi_cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Cursor {
}

#[napi(ts_return_type = "Array<cst.RuleNode>")]
pub fn path_rule_nodes(&self, env: Env) -> Vec<JsObject> {
pub fn ancestors(&self, env: Env) -> Vec<JsObject> {
self.0
.ancestors()
.map(|rust_rule_node| rust_rule_node.to_js(&env))
Expand Down

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

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

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

0 comments on commit daea4b7

Please sign in to comment.