Converts a token stream into a Wikidot SyntaxTree.
The parser consumes tokens produced by the Lexer and emits a tree of
Element nodes. Block-level rules are tried in priority order; when
none match, the fallback paragraph rule collects inline tokens until the
next blank line.
For most use-cases the standalone parse function is simpler than
constructing a Parser directly.
Converts a token stream into a Wikidot SyntaxTree.
The parser consumes tokens produced by the
Lexerand emits a tree of Element nodes. Block-level rules are tried in priority order; when none match, the fallback paragraph rule collects inline tokens until the next blank line.For most use-cases the standalone parse function is simpler than constructing a
Parserdirectly.