aboutsummaryrefslogtreecommitdiff
path: root/repl.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-05-26 15:13:34 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-05-26 15:20:14 +0200
commit8414e07010b2265db3cbbd2854d8dc49acc63ac8 (patch)
treec3e7d969d792082a3cbeec6b74538453238cbaad /repl.c
parentfa892b99e7e612f2414ea2ff1da1f945da3ecad1 (diff)
downloadell-8414e07010b2265db3cbbd2854d8dc49acc63ac8.tar.gz
ell-8414e07010b2265db3cbbd2854d8dc49acc63ac8.tar.xz
ell-8414e07010b2265db3cbbd2854d8dc49acc63ac8.zip
Implement dynamic scoping
Okay, that was a PITA to not have. But I think I'm set now, feature-wise.
Diffstat (limited to 'repl.c')
-rw-r--r--repl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/repl.c b/repl.c
index d374d13..42d6bd1 100644
--- a/repl.c
+++ b/repl.c
@@ -61,7 +61,7 @@ complete (const char *text, int start, int end) {
static char *buf[128];
size_t n = 1, len = strlen (text);
- for (struct item *item = ctx.variables; item; item = item->next)
+ for (struct item *item = ctx.globals; item; item = item->next)
if (n < 127 && !strncmp (item->head->value, text, len))
buf[n++] = format ("%s", item->head->value);
for (struct native_fn *iter = ctx.native; iter; iter = iter->next)