Skip to content

Commit 590398a

Browse files
Copilotcamc314
andcommitted
Changes before error encountered
Co-authored-by: camc314 <[email protected]>
1 parent df3e6c9 commit 590398a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/oxc_parser/src/modifiers.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,9 @@ impl<'a> ParserImpl<'a> {
331331
self.bump_any();
332332
let modifier = self.modifier(kind, self.end_span(span));
333333
if modifier.kind == ModifierKind::Export {
334-
self.error(diagnostics::modifier_must_precede_other_modifier(
335-
&modifier,
336-
ModifierKind::Declare,
337-
));
334+
self.error(diagnostics::modifier_already_seen(&modifier));
335+
// Don't add the duplicate export modifier to the list
336+
continue;
338337
}
339338
self.check_for_duplicate_modifiers(flags, &modifier);
340339
flags.set(modifier_flags, true);

0 commit comments

Comments
 (0)