Enum asciimath_parser::tree::Simple
source · 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.