add foreach(a/type a : thinkeriterator/actoriterator)

This commit is contained in:
Ricardo Luís Vaz Silva 2023-10-15 17:15:52 -03:00 committed by Rachael Alexanderson
commit 71999e7cf6
7 changed files with 187 additions and 0 deletions

View file

@ -277,6 +277,7 @@ enum EFxType
EFX_ForEachLoop,
EFX_MapForEachLoop,
EFX_BlockForEachLoop,
EFX_CastForEachLoop,
EFX_JumpStatement,
EFX_ReturnStatement,
EFX_ClassTypeCast,
@ -2129,6 +2130,26 @@ public:
//ExpEmit Emit(VMFunctionBuilder *build); This node is transformed, so it won't ever be emitted itself
};
//==========================================================================
//
// FxCastForEachLoop
//
//==========================================================================
class FxCastForEachLoop : public FxExpression
{
FName castClassName;
FName varVarName;
FxExpression* CastIteratorExpr;
FxExpression* Code;
public:
FxCastForEachLoop(FName cv, FName vv, FxExpression* castiteartorexpr, FxExpression* code, const FScriptPosition& pos);
~FxCastForEachLoop();
FxExpression *Resolve(FCompileContext&);
//ExpEmit Emit(VMFunctionBuilder *build); This node is transformed, so it won't ever be emitted itself
};
//==========================================================================
//
// FxJumpStatement