diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 11:41:30 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 11:41:30 +0100 |
commit | 87b5e14c75dbc02b5bc610dfa33d5789570df5db (patch) | |
tree | 649b7fea9df7c8aa747a8e33618cce261e53a11c /src/yellow | |
parent | 9e02e432b570e33b703032f24a4fbb90cb7eb4eb (diff) |
Fix indexing errors
Diffstat (limited to 'src/yellow')
-rw-r--r-- | src/yellow/syntax.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yellow/syntax.rs b/src/yellow/syntax.rs index 65ce647c7..58e8ab9b6 100644 --- a/src/yellow/syntax.rs +++ b/src/yellow/syntax.rs | |||
@@ -109,7 +109,7 @@ impl<R: TreeRoot> SyntaxNode<R> { | |||
109 | let red = self.red(); | 109 | let red = self.red(); |
110 | let parent = self.parent()?; | 110 | let parent = self.parent()?; |
111 | let next_sibling_idx = red.index_in_parent()? + 1; | 111 | let next_sibling_idx = red.index_in_parent()? + 1; |
112 | if next_sibling_idx == red.n_children() { | 112 | if next_sibling_idx == parent.red().n_children() { |
113 | return None; | 113 | return None; |
114 | } | 114 | } |
115 | Some(SyntaxNode { | 115 | Some(SyntaxNode { |