parserino.html.treebuilder

HTML tree construction (HTML Living Standard, "Tree construction").

Derived from lexbor (https://github.com/lexbor/lexbor). Copyright (C) 2018-2026 Alexander Borisov (lexbor), Apache-2.0: see LICENSE-lexbor and NOTICE-lexbor.

Types 1

The tree construction: it gets the tokens from the tokenizer (see sink) and builds the tree in doc

Fields
Tokenizer * tokenizer
Buffer!(DomNode *) openElementsThe stack of open elements and the list of active formatting elements (null = marker)
Buffer!(DomNode *) activeFormatting
bool framesetOk
DomElement * head
DomElement * body
CompatMode compatMode
DomNode * contextFragment parsing: the context element and the root of the result
DomElement * fragmentRoot
bool failedOut of memory
Methods
void beginDocument(DomDocument * d, Tokenizer * t) @nogc nothrow pure @safeStart parsing a document
bool beginFragment(DomDocument * d, Tokenizer * t, DomElement * contextElement) @nogc nothrow pure @safeStart parsing a fragment in the context of `contextElement` (an element of `d`)
bool process(ref Token t) @nogc nothrow pure @safeProcess a token (the tokenizer calls it)
void finish() @nogc nothrow pure @safeThe end of the input: pop everything
TokenSink sink() @nogc nothrow pure @safe returnThe sink for the tokenizer
Destructors
Nested Templates
Adjust