From 8414e07010b2265db3cbbd2854d8dc49acc63ac8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Fri, 26 May 2017 15:13:34 +0200
Subject: Implement dynamic scoping
Okay, that was a PITA to not have.
But I think I'm set now, feature-wise.
---
repl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'repl.c')
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)
--
cgit v1.2.3