Prefix parsing
This commit is contained in:
+9
-1
@@ -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>,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user