mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
More syntax changes
This commit is contained in:
parent
9895e0c0ae
commit
352ab5ed34
4 changed files with 81 additions and 49 deletions
|
@ -23,9 +23,12 @@ pub enum Expr {
|
|||
// Sum Types
|
||||
ApplyVariant(String, Option<Vec<Expr>>),
|
||||
|
||||
// Product Types
|
||||
EmptyRecord,
|
||||
|
||||
// Conditionals
|
||||
If(Box<Expr>, Box<Expr>, Box<Expr>),
|
||||
Match(Box<Expr>, SmallVec<[(Pattern, Box<Expr>); 4]>),
|
||||
Case(Box<Expr>, SmallVec<[(Pattern, Box<Expr>); 4]>),
|
||||
|
||||
// Error
|
||||
Error(Problem),
|
||||
|
@ -104,6 +107,7 @@ pub enum Problem {
|
|||
pub enum Pattern {
|
||||
Identifier(String),
|
||||
Variant(String, Option<Vec<Pattern>>),
|
||||
EmptyRecord,
|
||||
Underscore
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue