diff options
Diffstat (limited to 'src/syntax/parser.rs')
| -rw-r--r-- | src/syntax/parser.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs index 1198774b..13c7bd47 100644 --- a/src/syntax/parser.rs +++ b/src/syntax/parser.rs @@ -282,6 +282,16 @@ fn math_expr_prec(p: &mut Parser, min_prec: usize, stop: SyntaxKind) { p.eat(); } + SyntaxKind::Root => { + if min_prec < 3 { + p.eat(); + let m2 = p.marker(); + math_expr_prec(p, 2, stop); + math_unparen(p, m2); + p.wrap(m, SyntaxKind::MathRoot); + } + } + _ => p.expected("expression"), } |
