diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-08 14:10:19 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-08 14:10:19 -0500 |
| commit | 5d35f286336878a3529dabdb3f7800b6f84712eb (patch) | |
| tree | ee21c66d28027e84fd31080c145978fba18fec89 /ast.c | |
| parent | 9c842201f312edd483ee99dcf3e321bdac2a7073 (diff) | |
Improve reductions so they work better nested and also have bespoke code
optimized for min/max and argmin/argmax.
Diffstat (limited to 'ast.c')
| -rw-r--r-- | ast.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,8 +142,8 @@ CORD ast_to_xml(ast_t *ast) T(Repeat, "<Repeat>%r</Repeat>", optional_tagged("body", data.body)) T(If, "<If>%r%r%r</If>", optional_tagged("condition", data.condition), optional_tagged("body", data.body), optional_tagged("else", data.else_body)) T(When, "<When><subject>%r</subject>%r%r</When>", ast_to_xml(data.subject), when_clauses_to_xml(data.clauses), optional_tagged("else", data.else_body)) - T(Reduction, "<Reduction>%r%r</Reduction>", optional_tagged("iterable", data.iter), - optional_tagged("combination", data.combination)) + T(Reduction, "<Reduction op=%r%r>%r</Reduction>", xml_escape(OP_NAMES[data.op]), optional_tagged("key", data.key), + optional_tagged("iterable", data.iter)) T(Skip, "<Skip>%r</Skip>", data.target) T(Stop, "<Stop>%r</Stop>", data.target) T(PrintStatement, "<PrintStatement>%r</PrintStatement>", ast_list_to_xml(data.to_print)) |
