From 9510d9254cf4b9a4d57a2a12fa15dfdbee641bc7 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Wed, 24 Apr 2024 19:55:25 +0200 Subject: [PATCH] lang: fix matrix recovery --- crates/lang/src/parser/grammar/expression/collection/matrix.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/lang/src/parser/grammar/expression/collection/matrix.rs b/crates/lang/src/parser/grammar/expression/collection/matrix.rs index 2c572f5..a8e21a1 100644 --- a/crates/lang/src/parser/grammar/expression/collection/matrix.rs +++ b/crates/lang/src/parser/grammar/expression/collection/matrix.rs @@ -52,8 +52,10 @@ fn matrix_body(p: &mut Parser) { } }; } else if p.at(R_BRACK) { + mat_item.abandon(p); going = false; } else { + mat_item.abandon(p); let err = p.start("err"); p.do_bump(); err.complete_err(p, SyntaxError::Expected(vec![EXPR, R_BRACK]));