From 87b5e14c75dbc02b5bc610dfa33d5789570df5db Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 13:41:30 +0300 Subject: Fix indexing errors --- src/yellow/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yellow/syntax.rs') 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 SyntaxNode { let red = self.red(); let parent = self.parent()?; let next_sibling_idx = red.index_in_parent()? + 1; - if next_sibling_idx == red.n_children() { + if next_sibling_idx == parent.red().n_children() { return None; } Some(SyntaxNode { -- cgit v1.2.3