add foreach v loop for maps
This commit is contained in:
parent
c58bd6efb5
commit
5cb0e3bc5b
3 changed files with 49 additions and 13 deletions
|
|
@ -3388,9 +3388,11 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast, bool substitute)
|
|||
auto iter = static_cast<ZCC_ArrayIterationStmt*>(ast);
|
||||
auto var = iter->ItName->Name;
|
||||
FxExpression* const itArray = ConvertNode(iter->ItArray);
|
||||
FxExpression* const itArray2 = ConvertNode(iter->ItArray); // the handler needs two copies of this - here's the easiest place to create them.
|
||||
FxExpression* const itArray2 = ConvertNode(iter->ItArray);
|
||||
FxExpression* const itArray3 = ConvertNode(iter->ItArray);
|
||||
FxExpression* const itArray4 = ConvertNode(iter->ItArray); // the handler needs copies of this - here's the easiest place to create them.
|
||||
FxExpression* const body = ConvertImplicitScopeNode(ast, iter->LoopStatement);
|
||||
return new FxForEachLoop(iter->ItName->Name, itArray, itArray2, body, *ast);
|
||||
return new FxForEachLoop(iter->ItName->Name, itArray, itArray2, itArray3, itArray4, body, *ast);
|
||||
}
|
||||
|
||||
case AST_MapIterationStmt:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue