pub enum Node {
Text(String, Span),
ParagraphBreak(Span),
Command {
name: String,
args: Vec<Arg>,
body: Vec<Node>,
span: Span,
},
Environment {
name: String,
args: Vec<Arg>,
body: Vec<Node>,
span: Span,
},
Group(Vec<Node>, Span),
}Expand description
A single node in the LaTeX AST.
More variants will be added as the parser is built out.
Variants§
Text(String, Span)
A run of plain text characters
ParagraphBreak(Span)
A paragraph break (blank line in the source)
Command
A LaTeX command and its arguments, e.g. \textbf{hello}.
Environment
A \begin{name}...\end{name} environment
Group(Vec<Node>, Span)
A braced group {...} that is not a command argument.
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