aboutsummaryrefslogtreecommitdiff
path: root/environment.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-04 13:51:47 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-04 13:51:47 -0500
commite29aa52460df6a5d3e78f7e466947bcdd7a3bbb0 (patch)
treec0225e0db0d0e49e9ffe7e0e94e19ec067d98a8a /environment.h
parent0b7ca098ae1dc5e31485bc505a441d3796f0702b (diff)
Struct and enum methods and static members
Diffstat (limited to 'environment.h')
-rw-r--r--environment.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/environment.h b/environment.h
index 47d1dea2..8660fe68 100644
--- a/environment.h
+++ b/environment.h
@@ -20,6 +20,7 @@ typedef struct {
table_t *types, *globals, *locals;
table_t *type_namespaces; // Map of type name -> namespace table
compilation_unit_t *code;
+ CORD scope_prefix;
} env_t;
typedef struct {
@@ -29,6 +30,7 @@ typedef struct {
env_t *new_compilation_unit(void);
env_t *fresh_scope(env_t *env);
+env_t *namespace_env(env_t *env, const char *namespace_name);
__attribute__((noreturn))
void compiler_err(file_t *f, const char *start, const char *end, const char *fmt, ...);
binding_t *get_binding(env_t *env, const char *name);