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.
34 lines
739 B
Rust
34 lines
739 B
Rust
use crate::tokens::{Arrow, FontCommand, Function, Greek, Logical, Misc, Operation, Relation};
|
|
|
|
#[derive(Debug, Clone, PartialOrd, PartialEq)]
|
|
pub enum Literal {
|
|
Text(PlainText),
|
|
Symbol(Symbol),
|
|
Number(Number),
|
|
Greek(Greek),
|
|
FontCommand(FontCommand),
|
|
Relation(Relation),
|
|
Function(Function),
|
|
Logical(Logical),
|
|
Arrow(Arrow),
|
|
Misc(Misc),
|
|
Operation(Operation),
|
|
NewLine,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialOrd, PartialEq)]
|
|
pub struct PlainText {
|
|
pub text: String,
|
|
pub formatting: Option<FontCommand>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialOrd, PartialEq)]
|
|
pub struct Symbol {
|
|
pub symbol: String,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialOrd, PartialEq)]
|
|
pub struct Number {
|
|
pub number: String,
|
|
}
|