From a4fff5cb49b25aca4c889ec312ddf4c6c530c69b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 8 Sep 2024 21:55:15 -0400 Subject: Bugfix for default arguments not supporting enclosing types --- environment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'environment.h') 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); -- cgit v1.2.3