diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-22 14:02:48 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-22 14:02:48 -0400 |
| commit | ad51b208b4924d04f1d6a804178a67994b4f9e59 (patch) | |
| tree | 9ae29e0af02b7406a0cf07fdd8b0dd7fdac0aedf /environment.h | |
| parent | 2055439be4f5053b9a4d631cefd8bb7c83a8e4e3 (diff) | |
Overhaul of import syntax. Now everything uses `use`: `use foo`, `use
./foo.tm`, `use <foo.h>`, `use libfoo.so`
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/environment.h b/environment.h index b69e0a9e..0fd67b4e 100644 --- a/environment.h +++ b/environment.h @@ -43,7 +43,10 @@ typedef struct namespace_s { typedef struct env_s { table_t *types, *globals, *locals; - table_t *imports; // Map of 'use' name -> env_t* + // 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 + table_t *imports; compilation_unit_t *code; fn_ctx_t *fn_ctx; loop_ctx_t *loop_ctx; |
