aboutsummaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-01-02 20:29:55 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-01-02 20:29:55 -0500
commitb025cf269d2e07e179be4a0e34d936862dc640c2 (patch)
tree6bcce81829436a08dbe4f0101044c0cd07811525 /ast.c
parent500e4e1bd74b45476c4df0f4f9da72fbada9bb18 (diff)
Use `holding` blocks for mutexed data instead of lambdas
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index c6d59966..23f1409d 100644
--- a/ast.c
+++ b/ast.c
@@ -117,6 +117,7 @@ CORD ast_to_xml(ast_t *ast)
T(HeapAllocate, "<HeapAllocate>%r</HeapAllocate>", ast_to_xml(data.value))
T(StackReference, "<StackReference>%r</StackReference>", ast_to_xml(data.value))
T(Mutexed, "<Mutexed>%r</Mutexed>", ast_to_xml(data.value))
+ T(Holding, "<Holding>%r%r</Holding>", ast_to_xml(data.mutexed), ast_to_xml(data.body))
T(Min, "<Min>%r%r%r</Min>", ast_to_xml(data.lhs), ast_to_xml(data.rhs), optional_tagged("key", data.key))
T(Max, "<Max>%r%r%r</Max>", ast_to_xml(data.lhs), ast_to_xml(data.rhs), optional_tagged("key", data.key))
T(Array, "<Array>%r%r</Array>", optional_tagged_type("item-type", data.item_type), ast_list_to_xml(data.items))
@@ -185,6 +186,7 @@ CORD type_ast_to_xml(type_ast_t *t)
T(TableTypeAST, "<TableType>%r %r</TableType>", type_ast_to_xml(data.key), type_ast_to_xml(data.value))
T(FunctionTypeAST, "<FunctionType>%r %r</FunctionType>", arg_list_to_xml(data.args), type_ast_to_xml(data.ret))
T(OptionalTypeAST, "<OptionalType>%r</OptionalType>", data.type)
+ T(MutexedTypeAST, "<MutexedType>%r</MutexedType>", data.type)
#undef T
default: return CORD_EMPTY;
}