aboutsummaryrefslogtreecommitdiff
path: root/repl.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-10 16:03:41 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-10 16:03:41 -0400
commitb37bd70b602b7ac6427dcf29f7cd9241b0a7ae09 (patch)
treeafa3ba4caebb728c43b96e176b8a569b3ad5f469 /repl.c
parent671f81137ee2e5de632526109e02c4b79197e432 (diff)
For tables, deprecate support for square bracket indexing and .default
values, replacing them with a `:bump()` function for tables with numeric values. This means that counters can be implemented easily without the need to mask complexity.
Diffstat (limited to 'repl.c')
-rw-r--r--repl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/repl.c b/repl.c
index fc531b86..7d4eae33 100644
--- a/repl.c
+++ b/repl.c
@@ -507,10 +507,6 @@ void eval(env_t *env, ast_t *ast, void *dest)
}
if (table_ast->fallback)
eval(env, table_ast->fallback, &table.fallback);
- if (table_ast->default_value) {
- table.default_value = GC_MALLOC(value_size);
- eval(env, table_ast->default_value, table.default_value);
- }
memcpy(dest, &table, sizeof(table_t));
break;
}