LibWeb: Emit comment token for unterminated bogus comments on EOF

This commit is contained in:
Tim Ledbetter
2025-01-06 15:05:36 +00:00
committed by Andreas Kling
parent 627b7dd936
commit 8b5e9c2a1d
2 changed files with 4 additions and 5 deletions

View File

@@ -488,8 +488,8 @@ _StartOfFunction:
}
ON_EOF
{
m_queued_tokens.enqueue(move(m_current_token));
EMIT_EOF;
m_current_token.set_comment(consume_current_builder());
EMIT_CURRENT_TOKEN_FOLLOWED_BY_EOF;
}
ON(0)
{