From 1d027ff6d22a2961d5078aa7e1abaa2710a1fb0e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 12 Mar 2024 11:47:48 +0100 Subject: [PATCH] Fix parsing of parenthesized imports (#3633) --- crates/typst-syntax/src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-syntax/src/parser.rs b/crates/typst-syntax/src/parser.rs index e5ecbc11f..50032898e 100644 --- a/crates/typst-syntax/src/parser.rs +++ b/crates/typst-syntax/src/parser.rs @@ -984,7 +984,7 @@ fn module_import(p: &mut Parser) { /// Parses items to import from a module: `a, b, c`. fn import_items(p: &mut Parser) { let m = p.marker(); - while !p.eof() && !p.at(SyntaxKind::Semicolon) { + while !p.current().is_terminator() { let item_marker = p.marker(); if !p.eat_if(SyntaxKind::Ident) { p.unexpected();