HTML: Add fixme to tokenizer about tree construction stage state changes

This commit is contained in:
networkException 2022-01-06 01:58:13 +01:00
parent 520febd542
commit fbaae88b65
Signed by: networkException
GPG key ID: E3877443AE684391

View file

@ -12,6 +12,9 @@ export function tokenize(input: string): Array<Token> {
const tokenizer = new Tokenizer(input); const tokenizer = new Tokenizer(input);
// FIXME: This completely ignores any state changes set by the tree construction
// stage - as well, there is no tree construction stage.
// See https://html.spec.whatwg.org/multipage/parsing.html#tokenization
while (tokenizer.tokens[tokenizer.tokens.length - 1]?.type !== Type.EndOfFile) while (tokenizer.tokens[tokenizer.tokens.length - 1]?.type !== Type.EndOfFile)
tokenizer.spin(); tokenizer.spin();