From 4715487a4be9f03ad58cb3199e95573e262f6387 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 26 Aug 2025 02:56:51 -0400 Subject: More termify fixes --- src/formatter/utils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/formatter/utils.c b/src/formatter/utils.c index 37751377..a032ec2f 100644 --- a/src/formatter/utils.c +++ b/src/formatter/utils.c @@ -117,7 +117,9 @@ OptionalText_t termify_inline(ast_t *ast, Table_t comments) { switch (ast->tag) { case BINOP_CASES: case Not: - case Negative: return parenthesize(format_inline_code(ast, comments), EMPTY_TEXT); + case Negative: + case HeapAllocate: + case StackReference: return parenthesize(format_inline_code(ast, comments), EMPTY_TEXT); default: return format_inline_code(ast, comments); } } @@ -126,7 +128,9 @@ Text_t termify(ast_t *ast, Table_t comments, Text_t indent) { switch (ast->tag) { case BINOP_CASES: case Not: - case Negative: return parenthesize(format_code(ast, comments, indent), indent); + case Negative: + case HeapAllocate: + case StackReference: return parenthesize(format_code(ast, comments, indent), indent); default: return format_inline_code(ast, comments); } } -- cgit v1.2.3