mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibWeb: Implement all CDATA tokenizer states
Even though we haven't implemented any switches to these states yet, we may as well have them ready for when we do implement the switches.
This commit is contained in:
@@ -2436,6 +2436,56 @@ _StartOfFunction:
|
||||
}
|
||||
END_STATE
|
||||
|
||||
BEGIN_STATE(CDATASection)
|
||||
{
|
||||
ON(']')
|
||||
{
|
||||
SWITCH_TO(CDATASectionBracket);
|
||||
}
|
||||
ON_EOF
|
||||
{
|
||||
PARSE_ERROR();
|
||||
EMIT_EOF;
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
EMIT_CURRENT_CHARACTER;
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
BEGIN_STATE(CDATASectionBracket)
|
||||
{
|
||||
ON(']')
|
||||
{
|
||||
SWITCH_TO(CDATASectionEnd);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
EMIT_CHARACTER_AND_RECONSUME_IN(']', CDATASection);
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
BEGIN_STATE(CDATASectionEnd)
|
||||
{
|
||||
ON(']')
|
||||
{
|
||||
EMIT_CHARACTER(']');
|
||||
}
|
||||
ON('>')
|
||||
{
|
||||
SWITCH_TO(Data);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
m_queued_tokens.enqueue(HTMLToken::make_character(']'));
|
||||
m_queued_tokens.enqueue(HTMLToken::make_character(']'));
|
||||
RECONSUME_IN(CDATASection);
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
default:
|
||||
TODO();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user