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
Notes: github-actions[bot] 2025-01-11 10:10:44 +00:00
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)
{