Delete obsolete stuff

This commit is contained in:
Richard Feldman 2019-04-17 19:32:10 -04:00
parent 0fd2bde5cd
commit 864eecf44c
30 changed files with 26 additions and 3805 deletions

View file

@ -1,44 +1,21 @@
use name::Name;
use typ::Type;
#[derive(Debug, PartialEq)]
pub enum Expr {
// Literals
Int(i64),
Frac(i64, u64),
String(String),
Char(char),
Var(String),
// Functions
Func(String, Box<Expr>),
Apply(Box<Expr>, Box<Expr>),
Operator(Box<Expr>, Operator, Box<Expr>),
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub enum Operator {
Plus, Minus, Star, Slash, DoubleSlash,
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub enum Builtin {
// Default
Negate,
Not,
// String
// StringLength,
}
#[derive(Debug, PartialEq)]
pub enum Expr {
Int(i64),
Ratio(i64, u64),
// Functions
CallOperator(Box<Expr>, Operator, Box<Expr>),
CallBuiltin(Builtin, Box<Expr>),
CallLambda(Box<Expr>, Box<Expr>),
}
#[derive(Debug, PartialEq)]
pub enum Pattern {
Name(Name), // `foo =`
As(Name, Box<Pattern>), // `<pattern> as foo`
Type(Type),
Symbol(String),
String(String),
Char(char),
Int(i64),
Float(f64),
Tuple(Vec<Pattern>),
Record(Vec<(Name, Option<Pattern>)>), // { a = 5, b : Int as x, c }
}