Skip to main content

Module parser

Module parser 

Source

Modules§

attribute
class
comment
doctype
error
id
parse
tag
text

Structs§

HsmlProcessContext
Mutable state carried through the parsing process.
RootNode
The root of a parsed HSML document, containing all top-level nodes.

Enums§

HsmlNode
A single node in the HSML abstract syntax tree.

Functions§

advance
Helper to advance a span by n bytes, returning the remaining span.
delimited_section_len
Find the byte length of an escape-aware delimited section (e.g. [...], (...)). Returns Some(len) including the opening and closing delimiters, or None if unclosed. The string must start with open. Quoted substrings inside are treated as atomic (a closing delimiter inside quotes is not matched).
quoted_string_len
Find the byte length of an escape-aware quoted string (e.g. "..." or '...'). Returns Some(len) including the surrounding quotes, or None if unclosed. The string must start with " or '.
take_prefix
Helper to take the first n bytes from a span.

Type Aliases§

HsmlResult
Convenience alias for parser results using the custom HSML error type.
Span
A located span over the input source, tracking line and column information.