summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/types.h b/types.h
index 20eb28b..9c6545f 100644
--- a/types.h
+++ b/types.h
@@ -922,6 +922,7 @@ enum {
};
typedef struct Return {
U8 flags;
+ Block *referring_to; /* eval uses this; it's the function body we're returning from */
Expression expr;
} Return;
@@ -1017,7 +1018,8 @@ typedef struct {
typedef struct Evaluator {
Allocator *allocr;
struct Typer *typer;
- bool returning;
+ Block *returning; /* function body from which we are returning OR loop body in which we are continuing/breaking */
+ bool is_break; /* is returning because of a break, as opposed to a continue? */
Value ret_val;
bool enabled;
ForeignFnManager ffmgr;