Skip to content

Commit

Permalink
Add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Nov 20, 2023
1 parent 9a6e0e3 commit f705de9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/codegen/parser/runtime/src/cst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl Node {
}
}

/// Returns a slice of the children (not all descendants) of this node.
pub fn children(&self) -> &[Node] {
match self {
Self::Rule(node) => &node.children,
Expand Down
1 change: 1 addition & 0 deletions crates/codegen/parser/runtime/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl Cursor {
self.current.text_range()
}

/// Returns the depth of the current node in the CST, i.e. the number of ancestors.
pub fn depth(&self) -> usize {
self.path.len()
}
Expand Down
1 change: 1 addition & 0 deletions crates/solidity/outputs/cargo/crate/src/generated/cst.rs

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.

1 change: 1 addition & 0 deletions crates/solidity/outputs/npm/crate/src/generated/cst.rs

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

1 change: 1 addition & 0 deletions crates/solidity/outputs/npm/crate/src/generated/cursor.rs

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

0 comments on commit f705de9

Please sign in to comment.