mirror of
https://github.com/exoticorn/curlywas.git
synced 2026-01-20 11:46:43 +01:00
add global vars + i64 & f64 support
This commit is contained in:
@@ -36,7 +36,9 @@ pub enum ImportType {
|
||||
pub struct GlobalVar {
|
||||
pub span: Span,
|
||||
pub name: String,
|
||||
pub type_: Type,
|
||||
pub value: Expression,
|
||||
pub type_: Option<Type>,
|
||||
pub mutable: bool
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -71,7 +73,9 @@ pub enum Expr {
|
||||
final_expression: Option<Box<Expression>>,
|
||||
},
|
||||
I32Const(i32),
|
||||
I64Const(i64),
|
||||
F32Const(f32),
|
||||
F64Const(f64),
|
||||
Variable(String),
|
||||
Let {
|
||||
name: String,
|
||||
@@ -147,6 +151,7 @@ impl Expr {
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum UnaryOp {
|
||||
Negate,
|
||||
Not
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
||||
Reference in New Issue
Block a user