pub enum Node {
Text(String, Span),
ParagraphBreak(Span),
Command {
name: String,
args: Vec<Arg>,
span: Span,
},
Group(Vec<Node>, Span),
Math(Vec<Node>, Span),
DisplayMath(Vec<Node>, Span),
Comment(String, Span),
}Expand description
A single node in the LaTeX AST.
Variants§
Text(String, Span)
A run of plain text characters
ParagraphBreak(Span)
A blank line in the source - signals a paragraph break.
Command
A LaTeX command and its arguments, e.g. \textbf{hello}.
Group(Vec<Node>, Span)
A braced group {...}.
Math(Vec<Node>, Span)
Inline match: $ ... $. The span covers both $ delimiters.
DisplayMath(Vec<Node>, Span)
Display math: \[ ... \]. The span covers both delimiters.
Comment(String, Span)
A % ... line comment. THe string is the body without the leading
% and without the trailing newline - the span covers the whole
run, including both. Comments in AST since they can actually affect produced PDF.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more