Skip to content

Commit f7ea18e

Browse files
author
Marlon Costa
committed
feat: Expose inner tree-sitter::Node for advanced use cases
Makes the inner tree_sitter::Node field public to allow direct access to the underlying tree-sitter API for advanced use cases. Based on WalkerKnapp/rust-code-analysis@026e424
1 parent 2dfadae commit f7ea18e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/node.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ impl Tree {
2424
}
2525

2626
/// An `AST` node.
27+
///
28+
/// The inner `tree_sitter::Node` is exposed for advanced use cases
29+
/// where direct access to the underlying tree-sitter API is needed.
2730
#[derive(Clone, Copy, Debug)]
28-
pub struct Node<'a>(OtherNode<'a>);
31+
pub struct Node<'a>(pub OtherNode<'a>);
2932

3033
impl<'a> Node<'a> {
3134
/// Checks if a node represents a syntax error or contains any syntax errors

0 commit comments

Comments
 (0)