Prefix parsing

This commit is contained in:
2026-05-04 19:58:34 +02:00
parent c083a547d7
commit ba24db481c
4 changed files with 47 additions and 4 deletions
+9 -1
View File
@@ -72,6 +72,13 @@ pub enum Postfix {
Binary(BinaryOp, Expression),
}
#[derive(Debug, Clone, Serialize)]
pub enum PreFix {
Ref,
RefMut,
Deref,
}
#[derive(Debug, Clone, Serialize)]
pub enum Statement {
Expression(Expression),
@@ -135,8 +142,9 @@ pub enum Expression {
FloatLiteral(f64),
BoolLiteral(bool),
StringLiteral(String),
Postfix {
Fix {
initial: Box<Expression>,
prefixes: Vec<PreFix>,
postfixes: Vec<Postfix>,
},
}