diff options
Diffstat (limited to 'docs/dev/syntax.md')
-rw-r--r-- | docs/dev/syntax.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/dev/syntax.md b/docs/dev/syntax.md index 2eb08b7ca..1edafab68 100644 --- a/docs/dev/syntax.md +++ b/docs/dev/syntax.md | |||
@@ -195,7 +195,7 @@ Modeling this with immutable trees is possible, but annoying. | |||
195 | A function green tree is not super-convenient to use. | 195 | A function green tree is not super-convenient to use. |
196 | The biggest problem is accessing parents (there are no parent pointers!). | 196 | The biggest problem is accessing parents (there are no parent pointers!). |
197 | But there are also "identify" issues. | 197 | But there are also "identify" issues. |
198 | Let's say you want to write a code which builds a list of expressions in a file: `fn collect_exrepssions(file: GreenNode) -> HashSet<GreenNode>`. | 198 | Let's say you want to write a code which builds a list of expressions in a file: `fn collect_expressions(file: GreenNode) -> HashSet<GreenNode>`. |
199 | For the input like | 199 | For the input like |
200 | 200 | ||
201 | ```rust | 201 | ```rust |
@@ -236,7 +236,7 @@ impl SyntaxNode { | |||
236 | self.parent.clone() | 236 | self.parent.clone() |
237 | } | 237 | } |
238 | fn children(&self) -> impl Iterator<Item = SyntaxNode> { | 238 | fn children(&self) -> impl Iterator<Item = SyntaxNode> { |
239 | let mut offset = self.offset | 239 | let mut offset = self.offset; |
240 | self.green.children().map(|green_child| { | 240 | self.green.children().map(|green_child| { |
241 | let child_offset = offset; | 241 | let child_offset = offset; |
242 | offset += green_child.text_len; | 242 | offset += green_child.text_len; |