aboutsummaryrefslogtreecommitdiff
path: root/environment.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-02-09 13:57:54 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-02-09 13:57:54 -0500
commitbe87d8169d98eb358891d155ce84cff311ec27c2 (patch)
treea609244e8c1eae1f2a8679da4b8bdc83fdc8cf20 /environment.h
parent6310f0565641dd64ae435c6a352c76e54fb9ddba (diff)
Convert the logic for finding closed variables to a more pure functional
style with fewer side effects
Diffstat (limited to 'environment.h')
-rw-r--r--environment.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/environment.h b/environment.h
index 616bfc58..465ecfaf 100644
--- a/environment.h
+++ b/environment.h
@@ -16,13 +16,6 @@ typedef struct {
CORD function_naming;
} compilation_unit_t;
-typedef struct fn_ctx_s {
- struct fn_ctx_s *parent;
- type_t *return_type;
- Table_t *closure_scope;
- Table_t *closed_vars;
-} fn_ctx_t;
-
typedef struct deferral_s {
struct deferral_s *next;
struct env_s *defer_env;
@@ -49,7 +42,7 @@ typedef struct env_s {
// - Raw 'use' string for module imports
Table_t *imports;
compilation_unit_t *code;
- fn_ctx_t *fn_ctx;
+ type_t *fn_ret;
loop_ctx_t *loop_ctx;
deferral_t *deferred;
CORD libname; // Currently compiling library name (if any)