aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-06-16 18:40:34 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-06-16 18:40:34 -0400
commit28de9aeb84e4257773b6d7f4c4cb04a0c1e10d40 (patch)
tree8830f7455c423aed6bbd7879fe7f47447e8f9d59 /typecheck.c
parent4724d40e413c953b77ff4ff26d128a6a5daac874 (diff)
Deprecate '-l' as a command line flag but instead support 'use -lblah'
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c
index f7f4ccc7..d3ce2da6 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -351,6 +351,9 @@ void bind_statement(env_t *env, ast_t *statement)
break;
}
case Use: case Import: {
+ if (statement->tag == Use && strncmp(Match(statement, Use)->name, "-l", 2) == 0)
+ break;
+
env_t *module_env = load_module(env, statement);
for (table_t *bindings = module_env->locals; bindings != module_env->globals; bindings = bindings->fallback) {
for (int64_t i = 1; i <= Table$length(*bindings); i++) {