diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-15 13:35:30 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-15 13:35:30 -0400 |
| commit | 5cdaf3e3facec8c67dcf18db9ff4c64612667dc7 (patch) | |
| tree | 561a8819247f95d2b29b4a1fc447d8d85ba31d3f /environment.h | |
| parent | 9454c5fa0d7d814003f470923ea3ce2e9be21a7d (diff) | |
Fancy skip/stop implementation
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/environment.h b/environment.h index 8abc889a..6defc631 100644 --- a/environment.h +++ b/environment.h @@ -20,13 +20,20 @@ typedef struct { type_t *return_type; table_t *closure_scope; table_t *closed_vars; -} fn_context_t; +} fn_ctx_t; + +typedef struct loop_ctx_s { + struct loop_ctx_s *next; + const char *key_name, *value_name; + CORD skip_label, stop_label; +} loop_ctx_t; typedef struct { table_t *types, *globals, *locals; table_t *type_namespaces; // Map of type name -> namespace table compilation_unit_t *code; - fn_context_t *fn_ctx; + fn_ctx_t *fn_ctx; + loop_ctx_t *loop_ctx; CORD scope_prefix; } env_t; |
