aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-07-31 11:41:30 +0100
committerAleksey Kladov <[email protected]>2018-07-31 11:41:30 +0100
commit87b5e14c75dbc02b5bc610dfa33d5789570df5db (patch)
tree649b7fea9df7c8aa747a8e33618cce261e53a11c /src
parent9e02e432b570e33b703032f24a4fbb90cb7eb4eb (diff)
Fix indexing errors
Diffstat (limited to 'src')
-rw-r--r--src/parser/grammar/expressions.rs2
-rw-r--r--src/yellow/syntax.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/parser/grammar/expressions.rs b/src/parser/grammar/expressions.rs
index 4861536f8..a6456c8d5 100644
--- a/src/parser/grammar/expressions.rs
+++ b/src/parser/grammar/expressions.rs
@@ -69,7 +69,7 @@ fn atom_expr(p: &mut Parser) -> Option<CompletedMarker> {
69 match p.current() { 69 match p.current() {
70 L_PAREN => Some(tuple_expr(p)), 70 L_PAREN => Some(tuple_expr(p)),
71 _ => { 71 _ => {
72 p.error("expected expression"); 72 p.err_and_bump("expected expression");
73 None 73 None
74 } 74 }
75 } 75 }
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 {