@@ -68,7 +68,7 @@ class Statement_t;
6868class Body_t ;
6969class AssignableNameList_t ;
7070class StarExp_t ;
71- class CompInner_t ;
71+ class CompFor_t ;
7272class AssignableChain_t ;
7373class UnaryExp_t ;
7474class Parens_t ;
@@ -358,14 +358,14 @@ AST_NODE(ForStepValue)
358358 AST_MEMBER (ForStepValue, &value)
359359AST_END (ForStepValue)
360360
361- AST_NODE (For )
361+ AST_NODE (ForNum )
362362 ast_ptr<true , Variable_t> varName;
363363 ast_ptr<true , Exp_t> startValue;
364364 ast_ptr<true , Exp_t> stopValue;
365365 ast_ptr<false , ForStepValue_t> stepValue;
366366 ast_sel<true , Block_t, Statement_t> body;
367- AST_MEMBER (For , &varName, &startValue, &stopValue, &stepValue, &body)
368- AST_END (For )
367+ AST_MEMBER (ForNum , &varName, &startValue, &stopValue, &stepValue, &body)
368+ AST_END (ForNum )
369369
370370AST_NODE (ForEach)
371371 ast_ptr<true , AssignableNameList_t> nameList;
@@ -374,6 +374,11 @@ AST_NODE(ForEach)
374374 AST_MEMBER (ForEach, &nameList, &loopValue, &body)
375375AST_END (ForEach)
376376
377+ AST_NODE (For)
378+ ast_sel<true , ForEach_t, ForNum_t> forLoop;
379+ AST_MEMBER (For, &forLoop)
380+ AST_END (For)
381+
377382AST_NODE (Do)
378383 ast_ptr<true , Body_t> body;
379384 AST_MEMBER (Do, &body)
@@ -394,7 +399,7 @@ AST_END(Try)
394399
395400AST_NODE (Comprehension)
396401 ast_ptr<true , Seperator_t> sep;
397- ast_sel_list<false , NormalDef_t, SpreadListExp_t, CompInner_t ,
402+ ast_sel_list<false , NormalDef_t, SpreadListExp_t, CompFor_t ,
398403 /* non-syntax-rule*/ Statement_t> items;
399404 AST_MEMBER (Comprehension, &sep, &items)
400405AST_END (Comprehension)
@@ -407,7 +412,7 @@ AST_END(CompValue)
407412AST_NODE (TblComprehension)
408413 ast_ptr<true , Exp_t> key;
409414 ast_ptr<false , CompValue_t> value;
410- ast_ptr<true , CompInner_t > forLoop;
415+ ast_ptr<true , CompFor_t > forLoop;
411416 AST_MEMBER (TblComprehension, &key, &value, &forLoop)
412417AST_END (TblComprehension)
413418
@@ -422,19 +427,19 @@ AST_NODE(CompForEach)
422427 AST_MEMBER (CompForEach, &nameList, &loopValue)
423428AST_END (CompForEach)
424429
425- AST_NODE (CompFor )
430+ AST_NODE (CompForNum )
426431 ast_ptr<true , Variable_t> varName;
427432 ast_ptr<true , Exp_t> startValue;
428433 ast_ptr<true , Exp_t> stopValue;
429434 ast_ptr<false , ForStepValue_t> stepValue;
430- AST_MEMBER (CompFor , &varName, &startValue, &stopValue, &stepValue)
431- AST_END (CompFor )
435+ AST_MEMBER (CompForNum , &varName, &startValue, &stopValue, &stepValue)
436+ AST_END (CompForNum )
432437
433- AST_NODE (CompInner )
438+ AST_NODE (CompFor )
434439 ast_ptr<true , Seperator_t> sep;
435- ast_sel_list<true , CompFor_t , CompForEach_t, Exp_t> items;
436- AST_MEMBER (CompInner , &sep, &items)
437- AST_END (CompInner )
440+ ast_sel_list<true , CompForNum_t , CompForEach_t, Exp_t> items;
441+ AST_MEMBER (CompFor , &sep, &items)
442+ AST_END (CompFor )
438443
439444AST_NODE (Assign)
440445 ast_ptr<true , Seperator_t> sep;
@@ -553,7 +558,7 @@ AST_NODE(SimpleValue)
553558 ast_sel<true ,
554559 TableLit_t, ConstValue_t,
555560 If_t, Switch_t, With_t, ClassDecl_t,
556- ForEach_t, For_t, While_t, Repeat_t,
561+ For_t, While_t, Repeat_t,
557562 Do_t, Try_t, UnaryValue_t,
558563 TblComprehension_t, Comprehension_t,
559564 FunLit_t, Num_t, VarArg_t> value;
@@ -919,7 +924,7 @@ AST_NODE(PipeBody)
919924AST_END (PipeBody)
920925
921926AST_NODE (StatementAppendix)
922- ast_sel<true , IfLine_t, WhileLine_t, CompInner_t > item;
927+ ast_sel<true , IfLine_t, WhileLine_t, CompFor_t > item;
923928 AST_MEMBER (StatementAppendix, &item)
924929AST_END (StatementAppendix)
925930
@@ -949,7 +954,7 @@ AST_END(ChainAssign)
949954
950955AST_NODE (Statement)
951956 ast_sel<true ,
952- Import_t, While_t, Repeat_t, For_t, ForEach_t,
957+ Import_t, While_t, Repeat_t, For_t,
953958 Return_t, Local_t, Global_t, Export_t, Macro_t, MacroInPlace_t,
954959 BreakLoop_t, Label_t, Goto_t, ShortTabAppending_t,
955960 Backcall_t, LocalAttrib_t, PipeBody_t, ExpListAssign_t, ChainAssign_t
0 commit comments