mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +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:
parent
31db3f21ae
commit
20911efd4d
8 changed files with 186 additions and 14 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue