Asm statements implemented

This commit is contained in:
2023-08-15 01:30:35 -05:00
parent 9936e44544
commit a6b3519f48
4 changed files with 74 additions and 10 deletions
+7 -1
View File
@@ -40,6 +40,7 @@ pub enum Statement {
Conditional(Conditional),
WhileLoop(WhileLoop),
RepeatLoop(RepeatLoop),
Asm(Asm)
}
#[derive(PartialEq, Clone, Debug)]
@@ -103,6 +104,12 @@ pub struct RepeatLoop {
pub body: Block,
}
#[derive(PartialEq, Clone, Debug)]
pub struct Asm {
pub args: Vec<BoxExpr>,
pub body: String
}
/// One of the five arithmetical operators
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
pub enum Operator {
@@ -136,7 +143,6 @@ pub enum Expr {
Address(Lvalue),
Call(BoxExpr, Vec<Expr>),
Subscript(BoxExpr, BoxExpr),
Member(BoxExpr, String),
Infix(BoxExpr, Operator, BoxExpr),
String(String),
}