mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
LibWeb: More work on the HTML parser and tokenizer
The parser can now switch the state of the tokenizer! Very webby. :^)
This commit is contained in:
@@ -54,6 +54,8 @@ String HTMLToken::to_string() const
|
||||
case HTMLToken::Type::EndOfFile:
|
||||
builder.append("EndOfFile");
|
||||
break;
|
||||
case HTMLToken::Type::Invalid:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
if (type() == HTMLToken::Type::StartTag || type() == HTMLToken::Type::EndTag) {
|
||||
@@ -72,7 +74,7 @@ String HTMLToken::to_string() const
|
||||
if (type() == HTMLToken::Type::Comment || type() == HTMLToken::Type::Character) {
|
||||
builder.append(" { data: '");
|
||||
builder.append(m_comment_or_character.data.to_string());
|
||||
builder.append(" }");
|
||||
builder.append("' }");
|
||||
}
|
||||
|
||||
return builder.to_string();
|
||||
|
||||
Reference in New Issue
Block a user