Skip to content

Commit

Permalink
Add rowan::api::SyntaxNode::new_root_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Oct 4, 2023
1 parent 233fa27 commit d2fce1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ impl<L: Language> SyntaxNode<L> {
pub fn new_root(green: GreenNode) -> SyntaxNode<L> {
SyntaxNode::from(cursor::SyntaxNode::new_root(green))
}
pub fn new_root_mut(green: GreenNode) -> SyntaxNode<L> {
SyntaxNode::from(cursor::SyntaxNode::new_root_mut(green))
}
/// Returns a green tree, equal to the green tree this node
/// belongs two, except with this node substitute. The complexity
/// of operation is proportional to the depth of the tree
Expand Down

0 comments on commit d2fce1a

Please sign in to comment.