assignment: Add variable assignment
* Syntax for x = y * Compiler creates Inst::Store thunks * New Vm::store function Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::syn::Spanned;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Stmt {
|
||||
Assign(AssignLhs, Expr),
|
||||
Assign(SpAssignLhs, SpExpr),
|
||||
Expr(SpExpr),
|
||||
If {
|
||||
if_true: SpCondExpr,
|
||||
@@ -20,6 +20,8 @@ pub enum Stmt {
|
||||
},
|
||||
}
|
||||
|
||||
pub type SpAssignLhs = Spanned<AssignLhs>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum AssignLhs {
|
||||
/// A simple assignment.
|
||||
|
||||
Reference in New Issue
Block a user