You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.1 KiB
Rust
81 lines
1.1 KiB
Rust
use crate::tokens::{Arrow, FontCommand, Function, Greek, Logical, Relation};
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub enum Literal {
|
|
Plus,
|
|
Minus,
|
|
CDot,
|
|
Ast,
|
|
Star,
|
|
Slash,
|
|
Backslash,
|
|
Times,
|
|
Div,
|
|
LTimes,
|
|
RTimes,
|
|
Bowtie,
|
|
Circ,
|
|
OPlus,
|
|
OTimes,
|
|
ODot,
|
|
Wedge,
|
|
BidWedge,
|
|
Vee,
|
|
Cap,
|
|
BigCap,
|
|
Cup,
|
|
BigCup,
|
|
Del,
|
|
Grad,
|
|
PlusMinus,
|
|
EmptySet,
|
|
Infty,
|
|
Aleph,
|
|
Therefore,
|
|
Because,
|
|
LDots,
|
|
CDots,
|
|
VDots,
|
|
DDots,
|
|
EPipes,
|
|
Quad,
|
|
Angle,
|
|
Frown,
|
|
Triangle,
|
|
Diamond,
|
|
Square,
|
|
LFloor,
|
|
RFloor,
|
|
LCeiling,
|
|
RCeiling,
|
|
Complex,
|
|
Natural,
|
|
Rational,
|
|
Real,
|
|
Integer,
|
|
Text(TextNode),
|
|
Symbol(SymbolNode),
|
|
Number(NumberNode),
|
|
Greek(Greek),
|
|
FontCommand(FontCommand),
|
|
Relation(Relation),
|
|
Function(Function),
|
|
Logical(Logical),
|
|
Arrow(Arrow),
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct TextNode {
|
|
text: String,
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct SymbolNode {
|
|
symbol: String,
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct NumberNode {
|
|
number: String,
|
|
}
|