x86_64 arch + asm start
This commit is contained in:
@@ -45,6 +45,7 @@ pub enum ExprTy {
|
||||
Import(Ident),
|
||||
Fn(Box<Func>),
|
||||
Break,
|
||||
Asm(AsmBlock),
|
||||
}
|
||||
|
||||
impl Node for Expr {
|
||||
@@ -162,6 +163,7 @@ impl ExprTy {
|
||||
Self::Break => {
|
||||
write!(f, "break")
|
||||
}
|
||||
Self::Asm(asm) => asm.fmt(f, ctx),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,6 +218,7 @@ impl Expr {
|
||||
let ident = ctx.parse()?;
|
||||
ExprTy::Import(ident)
|
||||
}
|
||||
Token::Asm => ExprTy::Asm(ctx.parse()?),
|
||||
other => return ctx.unexpected(other, "an expression"),
|
||||
};
|
||||
Ok(Self {
|
||||
@@ -258,7 +261,7 @@ impl Expr {
|
||||
| ExprTy::If { body, .. }
|
||||
| ExprTy::Negate(body)
|
||||
| ExprTy::Assign { val: body, .. } => body.ends_with_block(),
|
||||
| ExprTy::Define { val: body, .. } => body.ends_with_block(),
|
||||
ExprTy::Define { val: body, .. } => body.ends_with_block(),
|
||||
ExprTy::Fn(f) => f.ends_with_block(),
|
||||
_ => false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user