aboutsummaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-01 13:53:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-01 13:53:51 -0400
commitc2daf6a92895d9835ecf75118f7fa1f25ff0395f (patch)
tree98786db0bd2246874e362475bca5da5a95d15c77 /ast.c
parente3ad5fdaaae075b4080c86bd243f5c7f3b09972b (diff)
Clean up 'when' syntax
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ast.c b/ast.c
index acbe109b..d39fd39e 100644
--- a/ast.c
+++ b/ast.c
@@ -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;
}