restructure parsing and typing modules
* parsing backend submodules * move typing to its own module
This commit is contained in:
@@ -4,10 +4,15 @@ use crate::ast::*;
|
||||
pub enum Expr {
|
||||
BinaryExpression(Box<Expr>, BinaryOperator, Box<Expr>),
|
||||
Identifier(Identifier),
|
||||
Call(Box<Call>),
|
||||
// Literals
|
||||
BooleanLiteral(bool),
|
||||
IntegerLiteral(i64),
|
||||
FloatLiteral(f64),
|
||||
StringLiteral(String),
|
||||
Call(Box<Call>),
|
||||
Block(Box<Block>),
|
||||
/// Last field is either Expr::Block or Expr::IfExpr
|
||||
IfExpr(Box<Expr>, Box<Block>, Box<Expr>),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
@@ -16,4 +21,7 @@ pub enum BinaryOperator {
|
||||
Sub,
|
||||
Mul,
|
||||
Div,
|
||||
Modulo,
|
||||
Equal,
|
||||
NotEqual,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user