From b37bd70b602b7ac6427dcf29f7cd9241b0a7ae09 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 10 Aug 2024 16:03:41 -0400 Subject: 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. --- ast.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ast.c') diff --git a/ast.c b/ast.c index 8f804c5f..0f325320 100644 --- a/ast.c +++ b/ast.c @@ -117,10 +117,9 @@ CORD ast_to_xml(ast_t *ast) T(Set, "%r%r", optional_tagged_type("item-type", data.item_type), ast_list_to_xml(data.items)) - T(Table, "%r%r%r%r%r
", + T(Table, "%r%r%r%r
", optional_tagged_type("key-type", data.key_type), optional_tagged_type("value-type", data.value_type), - ast_list_to_xml(data.entries), optional_tagged("fallback", data.fallback), - optional_tagged("default", data.default_value)) + ast_list_to_xml(data.entries), optional_tagged("fallback", data.fallback)) T(TableEntry, "%r%r", ast_to_xml(data.key), ast_to_xml(data.value)) T(Comprehension, "%r%r%r%r%r", optional_tagged("expr", data.expr), ast_list_to_xml(data.vars), optional_tagged("iter", data.iter), -- cgit v1.2.3