pub enum Simple<'a> {
Missing,
Number(&'a str),
Text(&'a str),
Ident(&'a str),
Symbol(&'a str),
Unary(SimpleUnary<'a>),
Func(SimpleFunc<'a>),
Binary(SimpleBinary<'a>),
Group(Group<'a>),
Matrix(Matrix<'a>),
}
Expand description
A simple element of parsing
This is the lowest level in the parse tree, but can be scaled back up with a group or matrix
Variants§
Missing
A missing expression
This is found in places where something didn’t exist, e.g. “sin” by itself will have a missing argument, but still be parsed.
Number(&'a str)
A raw number
Text(&'a str)
Raw text
Ident(&'a str)
An identity, usually a single character of something that doesn’t have asciimath meaning
Symbol(&'a str)
A recognized symbol
Unary(SimpleUnary<'a>)
A unary operator
Func(SimpleFunc<'a>)
A simple unary function
Binary(SimpleBinary<'a>)
A binary function
Group(Group<'a>)
A bracketed group
Matrix(Matrix<'a>)
A matrix
Implementations§
Trait Implementations§
Source§impl<'a> From<SimpleBinary<'a>> for Simple<'a>
impl<'a> From<SimpleBinary<'a>> for Simple<'a>
Source§fn from(inp: SimpleBinary<'a>) -> Self
fn from(inp: SimpleBinary<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SimpleFunc<'a>> for Simple<'a>
impl<'a> From<SimpleFunc<'a>> for Simple<'a>
Source§fn from(inp: SimpleFunc<'a>) -> Self
fn from(inp: SimpleFunc<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SimpleUnary<'a>> for Simple<'a>
impl<'a> From<SimpleUnary<'a>> for Simple<'a>
Source§fn from(inp: SimpleUnary<'a>) -> Self
fn from(inp: SimpleUnary<'a>) -> Self
Converts to this type from the input type.
impl<'a> Eq for Simple<'a>
impl<'a> StructuralPartialEq for Simple<'a>
Auto Trait Implementations§
impl<'a> Freeze for Simple<'a>
impl<'a> RefUnwindSafe for Simple<'a>
impl<'a> Send for Simple<'a>
impl<'a> Sync for Simple<'a>
impl<'a> Unpin for Simple<'a>
impl<'a> UnwindSafe for Simple<'a>
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