Skip to content

Commit

Permalink
Merge pull request #167 from jelmer/typo
Browse files Browse the repository at this point in the history
Fix typo in docstring: two => to
  • Loading branch information
lnicola authored Aug 16, 2024
2 parents e2d2e93 + a87bcd2 commit 73ed5e7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ impl<L: Language> SyntaxNode<L> {
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
/// 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)
}
Expand Down Expand Up @@ -263,8 +264,8 @@ impl<L: Language> SyntaxNode<L> {

impl<L: Language> SyntaxToken<L> {
/// 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)
}
Expand Down

0 comments on commit 73ed5e7

Please sign in to comment.