Skip to main content

Module node

Module node 

Source
Expand description

LaTeX AST node types — mirrors the subset of pylatexenc.latexwalker node kinds this codebase’s rules actually consume (see _helpers.py’s imports: LatexCharsNode, LatexCommentNode, LatexEnvironmentNode, LatexGroupNode, LatexMacroNode, LatexMathNode).

Positions are Unicode codepoint offsets, not byte offsets — matching Python str indexing (which is what pylatexenc.pos/.len and Fix.start/.end actually are; see the correction in report.rs’s Fix doc comment). A Vec<char> is the parser’s working representation of the source for exactly this reason.

Structs§

CharsNode
CommentNode
EnvironmentNode
GroupNode
MacroNode
MathNode
Span
SpecialsNode
A literal token pylatexenc tokenizes as its own node rather than plain characters or a macro: ~, &, --, ---, , `''`, ! ``, `` ? ``. Takes no arguments in the default database.

Enums§

GroupDelims
MathKind
Node

Type Aliases§

Args
One argument slot’s parse result, aligned 1:1 with the macro/env’s argspec string. None means an optional ([ or *) slot that wasn’t present at the call site — mirrors argnlist’s None entries in pylatexenc.