mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
prepare for Tag code gen
This commit is contained in:
parent
e742b77e0b
commit
c9a90c32e3
4 changed files with 281 additions and 110 deletions
|
@ -4,12 +4,12 @@ use roc_region::all::{Located, Region};
|
|||
|
||||
use self::Pattern::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Union {
|
||||
pub alternatives: Vec<Ctor>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Ctor {
|
||||
pub name: TagName,
|
||||
pub arity: usize,
|
||||
|
@ -27,7 +27,7 @@ pub enum Literal {
|
|||
Int(i64),
|
||||
Bit(bool),
|
||||
Byte(u8),
|
||||
Float(f64),
|
||||
Float(u64),
|
||||
Str(Box<str>),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue