diff --git a/src/api.rs b/src/api.rs index bf85fa0..03b2cc2 100644 --- a/src/api.rs +++ b/src/api.rs @@ -101,9 +101,10 @@ impl SyntaxNode { pub fn new_root_mut(green: GreenNode) -> SyntaxNode { 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 + /// belongs to, except with this node substituted. The complexity + /// of the operation is proportional to the depth of the tree. pub fn replace_with(&self, replacement: GreenNode) -> GreenNode { self.raw.replace_with(replacement) } @@ -263,8 +264,8 @@ impl SyntaxNode { impl SyntaxToken { /// Returns a green tree, equal to the green tree this token - /// belongs two, except with this token substitute. The complexity - /// of operation is proportional to the depth of the tree + /// belongs to, except with this token substituted. The complexity + /// of the operation is proportional to the depth of the tree. pub fn replace_with(&self, new_token: GreenToken) -> GreenNode { self.raw.replace_with(new_token) }