mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Delete obsolete stuff
This commit is contained in:
parent
0fd2bde5cd
commit
864eecf44c
30 changed files with 26 additions and 3805 deletions
55
src/expr.rs
55
src/expr.rs
|
@ -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 }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue