diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-10 16:03:41 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-10 16:03:41 -0400 |
| commit | b37bd70b602b7ac6427dcf29f7cd9241b0a7ae09 (patch) | |
| tree | afa3ba4caebb728c43b96e176b8a569b3ad5f469 /ast.c | |
| parent | 671f81137ee2e5de632526109e02c4b79197e432 (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 'ast.c')
| -rw-r--r-- | ast.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -117,10 +117,9 @@ CORD ast_to_xml(ast_t *ast) T(Set, "<Set>%r%r</Set>", optional_tagged_type("item-type", data.item_type), ast_list_to_xml(data.items)) - T(Table, "<Table>%r%r%r%r%r</Table>", + T(Table, "<Table>%r%r%r%r</Table>", 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, "<TableEntry>%r%r</TableEntry>", ast_to_xml(data.key), ast_to_xml(data.value)) T(Comprehension, "<Comprehension>%r%r%r%r%r</Comprehension>", optional_tagged("expr", data.expr), ast_list_to_xml(data.vars), optional_tagged("iter", data.iter), |
