initial commit
This commit is contained in:
commit
43df8c4b0a
9 changed files with 596 additions and 0 deletions
19
src/ast/expr.rs
Normal file
19
src/ast/expr.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use crate::ast::*;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Expr {
|
||||
BinaryExpression(Box<Expr>, BinaryOperator, Box<Expr>),
|
||||
Identifier(Identifier),
|
||||
IntegerLiteral(i64),
|
||||
FloatLiteral(f64),
|
||||
StringLiteral(String),
|
||||
Call(Box<Call>),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum BinaryOperator {
|
||||
Add,
|
||||
Sub,
|
||||
Mul,
|
||||
Div,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue