26 while (cur_node !=
TBODY && cur_node !=
TFOOT &&
94 switch (token->
type) {
107 }
else if (type ==
TH || type ==
TD) {
114 tag.
name.
ptr = (
const uint8_t *)
"tr";
162 }
else if (type ==
TABLE) {
166 type ==
TD || type ==
TH || type ==
TR) {
element_type current_node(hubbub_treebuilder *treebuilder)
Peek at the top element of the element stack.
hubbub_token_type type
The token type.
void * ctx
Context pointer.
hubbub_ns ns
Tag namespace.
hubbub_error handle_in_table_body(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle tokens in "in table body" insertion mode.
hubbub_string name
Tag name.
hubbub_tree_handler * tree_handler
Callback table.
const uint8_t * ptr
Pointer to data.
insertion_mode mode
The current insertion mode.
size_t len
Byte length of string.
hubbub_error handle_in_table(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle token in "in table" insertion mode.
hubbub_treebuilder_context context
Our context.
static hubbub_error table_sub_start_or_table_end(hubbub_treebuilder *treebuilder)
Handle the case common to some start tag and the table end tag cases.
hubbub_error insert_element(hubbub_treebuilder *treebuilder, const hubbub_tag *tag_name, bool push)
Create element and insert it into the DOM, potentially pushing it on the stack.
hubbub_attribute * attributes
Array of attribute data.
hubbub_tree_unref_node unref_node
Unreference node.
hubbub_ns
Possible namespaces.
union hubbub_token::@3 data
Type-specific data.
uint32_t element_in_scope(hubbub_treebuilder *treebuilder, element_type type, bool in_table)
Determine if an element is in (table) scope.
hubbub_error element_stack_pop(hubbub_treebuilder *treebuilder, hubbub_ns *ns, element_type *type, void **node)
Pop an element off the stack of open elements.
element_type element_type_from_name(hubbub_treebuilder *treebuilder, const hubbub_string *tag_name)
Convert an element name into an element type.
uint32_t n_attributes
Count of attributes.
static void table_clear_stack(hubbub_treebuilder *treebuilder)
Clear the stack back to a table body context.