Removed varKind in favor of mutability
This commit is contained in:
+2
-9
@@ -64,7 +64,7 @@ pub enum Statement {
|
||||
|
||||
// let/const/var x = ...
|
||||
VarDecl {
|
||||
kind: VarKind,
|
||||
mutable: bool,
|
||||
name: String,
|
||||
init: Option<Expression>,
|
||||
type_: Option<TypeExpr>,
|
||||
@@ -90,7 +90,7 @@ pub enum Statement {
|
||||
|
||||
// for (...) stmt
|
||||
For {
|
||||
init: (VarKind, String, Option<Expression>),
|
||||
init: (bool, String, Option<Expression>),
|
||||
condition: Option<Expression>,
|
||||
update: Option<Box<Statement>>,
|
||||
body: Box<Statement>,
|
||||
@@ -115,10 +115,3 @@ pub enum Expression {
|
||||
postfixes: Vec<Postfix>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub enum VarKind {
|
||||
Let,
|
||||
Const,
|
||||
Var,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user