diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 20:23:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 20:25:24 +0100 |
| commit | 7b2cdb9d95331bba87f9ae54c71b7103a10faf1c (patch) | |
| tree | 8b0581fd14849e6a6ceaa9527ed8534e05d2b695 /src/syntax | |
| parent | 77c29b36d4e8706163c8d52359577e403a15a1ae (diff) | |
Require colon in show rule
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/parser.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs index 8082fd64..cd318983 100644 --- a/src/syntax/parser.rs +++ b/src/syntax/parser.rs @@ -852,10 +852,11 @@ fn set_rule(p: &mut Parser) { fn show_rule(p: &mut Parser) { let m = p.marker(); p.assert(SyntaxKind::Show); - code_expr(p); - if p.eat_if(SyntaxKind::Colon) { + if !p.at(SyntaxKind::Colon) { code_expr(p); } + p.expect(SyntaxKind::Colon); + code_expr(p); p.wrap(m, SyntaxKind::ShowRule); } |
