Working expr statements
This commit is contained in:
@@ -30,6 +30,7 @@ pub enum BinaryOp {
|
||||
pub enum Expression {
|
||||
Literal(Literal),
|
||||
Path(ExprPath),
|
||||
Statement(Box<Statement>),
|
||||
Fix {
|
||||
initial: Box<Expression>,
|
||||
prefixes: Vec<Prefix>,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user