Working expr statements

This commit is contained in:
2026-05-21 06:51:34 +02:00
parent 0c8dc53617
commit b28591f9e6
7 changed files with 20 additions and 11 deletions
+1
View File
@@ -30,6 +30,7 @@ pub enum BinaryOp {
pub enum Expression {
Literal(Literal),
Path(ExprPath),
Statement(Box<Statement>),
Fix {
initial: Box<Expression>,
prefixes: Vec<Prefix>,
+1 -3
View File
@@ -3,13 +3,11 @@ use serde::Serialize;
use super::*;
#[derive(Debug, Clone, Serialize, Default)]
pub struct Block(pub Vec<Spanned<Statement>>);
pub struct Block(pub Vec<Spanned<Expression>>);
#[derive(Debug, Clone, Serialize)]
pub enum Statement {
Expression(Expression),
Block(Block),
VarDecl(VarDeclStmt),
Assign {
target: Expression,