diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-01 13:53:51 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-01 13:53:51 -0400 |
| commit | c2daf6a92895d9835ecf75118f7fa1f25ff0395f (patch) | |
| tree | 98786db0bd2246874e362475bca5da5a95d15c77 /ast.c | |
| parent | e3ad5fdaaae075b4080c86bd243f5c7f3b09972b (diff) | |
Clean up 'when' syntax
Diffstat (limited to 'ast.c')
| -rw-r--r-- | ast.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -58,9 +58,7 @@ CORD arg_list_to_xml(arg_ast_t *args) { CORD when_clauses_to_xml(when_clause_t *clauses) { CORD c = CORD_EMPTY; for (; clauses; clauses = clauses->next) { - c = CORD_all(c, "<case"); - if (clauses->var) c = CORD_all(c, " var=\"", Match(clauses->var, Var)->name, "\""); - c = CORD_all(c, " tag=\"", ast_to_xml(clauses->tag_name), "\">", ast_to_xml(clauses->body), "</case>"); + c = CORD_all(c, "<case tag=\"", ast_to_xml(clauses->tag_name), "\">", ast_list_to_xml(clauses->args), ast_to_xml(clauses->body), "</case>"); } return c; } |
