add foreach k,v loop for maps

* make FxFunctionCall and FxMemberFunctionCall take a temporary for args, since they always move it
* fix type for cast
This commit is contained in:
Ricardo Luís Vaz Silva 2023-10-15 13:20:51 -03:00 committed by Rachael Alexanderson
commit c58bd6efb5
9 changed files with 230 additions and 20 deletions

View file

@ -1177,6 +1177,19 @@ ZCC_TreeNode *TreeNodeDeepCopy_Internal(ZCC_AST *ast, ZCC_TreeNode *orig, bool c
break;
}
case AST_MapIterationStmt:
{
TreeNodeDeepCopy_Start(MapIterationStmt);
// ZCC_MapIterationStmt
copy->ItKey = static_cast<ZCC_VarName*>(TreeNodeDeepCopy_Internal(ast, origCasted->ItKey, true, copiedNodesList));
copy->ItValue = static_cast<ZCC_VarName*>(TreeNodeDeepCopy_Internal(ast, origCasted->ItValue, true, copiedNodesList));
copy->LoopStatement = static_cast<ZCC_Statement*>(TreeNodeDeepCopy_Internal(ast, origCasted->LoopStatement, true, copiedNodesList));
copy->ItMap = static_cast<ZCC_Expression*>(TreeNodeDeepCopy_Internal(ast, origCasted->ItMap, true, copiedNodesList));
break;
}
case AST_IfStmt:
{
TreeNodeDeepCopy_Start(IfStmt);