diff --git a/boa_engine/src/syntax/parser/statement/continue_stm/mod.rs b/boa_engine/src/syntax/parser/statement/continue_stm/mod.rs index 0d3fabdd19..fc33649954 100644 --- a/boa_engine/src/syntax/parser/statement/continue_stm/mod.rs +++ b/boa_engine/src/syntax/parser/statement/continue_stm/mod.rs @@ -62,11 +62,16 @@ where cursor.expect((Keyword::Continue, false), "continue statement", interner)?; let label = if let SemicolonResult::Found(tok) = cursor.peek_semicolon(interner)? { - match tok { - Some(tok) if tok.kind() == &TokenKind::Punctuator(Punctuator::Semicolon) => { - let _next = cursor.next(interner)?; + if let Some(token) = tok { + if token.kind() == &TokenKind::Punctuator(Punctuator::Semicolon) { + cursor.next(interner)?; + } else if token.kind() == &TokenKind::LineTerminator { + if let Some(token) = cursor.peek(0, interner)? { + if token.kind() == &TokenKind::Punctuator(Punctuator::Semicolon) { + cursor.next(interner)?; + } + } } - _ => {} } None