summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-26 22:47:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-26 22:47:07 +0200
commit8e6522d034783eb20016a9fe22eb28025731d5e9 (patch)
tree410a4cf1b48665fe366f0d6f54b6a641359903e0 /Libraries/LibWeb
parent9d8565cf9a45c19d804d0da1a27462d625497249 (diff)
downloadserenity-8e6522d034783eb20016a9fe22eb28025731d5e9.zip
LibWeb: Implement some missing tokenizer cases for EOF handling
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Parser/HTMLTokenizer.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
index eebf3e2601..c47f1faa4c 100644
--- a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
+++ b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
@@ -294,7 +294,9 @@ _StartOfFunction:
}
ON_EOF
{
- TODO();
+ PARSE_ERROR();
+ m_queued_tokens.enqueue(HTMLToken::make_character('<'));
+ EMIT_EOF;
}
ANYTHING_ELSE
{
@@ -357,8 +359,9 @@ _StartOfFunction:
ON_EOF
{
PARSE_ERROR();
- // FIXME: Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS character token and an end-of-file token.
- continue;
+ m_queued_tokens.enqueue(HTMLToken::make_character('<'));
+ m_queued_tokens.enqueue(HTMLToken::make_character('/'));
+ EMIT_EOF;
}
ANYTHING_ELSE
{
@@ -1063,7 +1066,8 @@ _StartOfFunction:
}
ON_EOF
{
- TODO();
+ PARSE_ERROR();
+ EMIT_EOF;
}
ANYTHING_ELSE
{