diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-08 21:55:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-08 21:55:15 -0400 |
| commit | a4fff5cb49b25aca4c889ec312ddf4c6c530c69b (patch) | |
| tree | 0ba91f8fcc500383db55fdde1012c19b4d703cb9 /environment.h | |
| parent | eb47f61450349b1be4e72ffe6f36273a1d01a428 (diff) | |
Bugfix for default arguments not supporting enclosing types
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/environment.h b/environment.h index f54ecccc..1e13d5ab 100644 --- a/environment.h +++ b/environment.h @@ -42,7 +42,7 @@ typedef struct namespace_s { } namespace_t; typedef struct env_s { - Table_t *types, *globals, *locals; + Table_t *types, *globals, *namespace_bindings, *locals; // Lookup table for env_t* where the key is: // - Resolved path for local imports (so that `use ./foo.tm` is the same as `use ./baz/../foo.tm`) // - Raw 'use' string for module imports @@ -68,6 +68,7 @@ env_t *new_compilation_unit(CORD *libname); env_t *load_module_env(env_t *env, ast_t *ast); CORD namespace_prefix(CORD *libname, namespace_t *ns); env_t *global_scope(env_t *env); +env_t *namespace_scope(env_t *env); env_t *fresh_scope(env_t *env); env_t *for_scope(env_t *env, ast_t *ast); env_t *namespace_env(env_t *env, const char *namespace_name); |
