Distinguish between 'regular' foreach and foreach_unique in FunctionEmitContext
We need to do this since it's illegal to have nested foreach statements, but nested foreach_unique, or foreach_unique inside foreach, etc., are all fine.
This commit is contained in:
7
ctx.h
7
ctx.h
@@ -160,9 +160,10 @@ public:
|
||||
finished. */
|
||||
void EndLoop();
|
||||
|
||||
/** Indicates that code generation for a 'foreach' or 'foreach_tiled'
|
||||
loop is about to start. */
|
||||
void StartForeach();
|
||||
/** Indicates that code generation for a 'foreach', 'foreach_tiled', or
|
||||
'foreach_unique' loop is about to start. */
|
||||
enum ForeachType { FOREACH_REGULAR, FOREACH_UNIQUE };
|
||||
void StartForeach(ForeachType ft);
|
||||
void EndForeach();
|
||||
|
||||
/** Emit code for a 'break' statement in a loop. If doCoherenceCheck
|
||||
|
||||
Reference in New Issue
Block a user