feat: 实现for循环语句的解析和执行逻辑,更新词法分析器以支持for关键字
This commit is contained in:
@@ -27,6 +27,14 @@ pub enum Stmt {
|
||||
body: Box<Stmt>,
|
||||
},
|
||||
|
||||
/// for 循环
|
||||
For {
|
||||
initializer: Option<Box<Stmt>>,
|
||||
condition: Option<Expr>,
|
||||
step: Option<Expr>,
|
||||
body: Box<Stmt>,
|
||||
},
|
||||
|
||||
/// 函数声明
|
||||
Function {
|
||||
name: String,
|
||||
|
||||
Reference in New Issue
Block a user