aboutsummaryrefslogtreecommitdiff
path: root/src/compile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-28 17:27:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-28 17:27:05 -0500
commitcfce376f585e0cd0231e95843617f75bd65b6c07 (patch)
tree9457de8bb9b8d0643c83cd5c08182af6a86804b7 /src/compile
parentb80e21ce3d673d981e44a725c62b62563a77db9b (diff)
Change autoformatter to no longer allow single-line functions
Diffstat (limited to 'src/compile')
-rw-r--r--src/compile/blocks.c4
-rw-r--r--src/compile/promotions.c4
-rw-r--r--src/compile/text.h8
3 files changed, 12 insertions, 4 deletions
diff --git a/src/compile/blocks.c b/src/compile/blocks.c
index 1059fd34..66869ecc 100644
--- a/src/compile/blocks.c
+++ b/src/compile/blocks.c
@@ -9,7 +9,9 @@
#include "compilation.h"
public
-Text_t compile_block(env_t *env, ast_t *ast) { return Texts("{\n", compile_inline_block(env, ast), "}\n"); }
+Text_t compile_block(env_t *env, ast_t *ast) {
+ return Texts("{\n", compile_inline_block(env, ast), "}\n");
+}
Text_t compile_block_expression(env_t *env, ast_t *ast) {
ast_list_t *stmts = Match(ast, Block)->statements;
diff --git a/src/compile/promotions.c b/src/compile/promotions.c
index 482e5ed0..7a169821 100644
--- a/src/compile/promotions.c
+++ b/src/compile/promotions.c
@@ -8,7 +8,9 @@
#include "../types.h"
#include "compilation.h"
-static Text_t quoted_str(const char *str) { return Text$quoted(Text$from_str(str), false, Text("\"")); }
+static Text_t quoted_str(const char *str) {
+ return Text$quoted(Text$from_str(str), false, Text("\""));
+}
public
bool promote(env_t *env, ast_t *ast, Text_t *code, type_t *actual, type_t *needed) {
diff --git a/src/compile/text.h b/src/compile/text.h
index c160c7a9..ae3cc5c3 100644
--- a/src/compile/text.h
+++ b/src/compile/text.h
@@ -14,5 +14,9 @@ Text_t compile_text(env_t *env, ast_t *ast, Text_t color);
Text_t compile_text_literal(Text_t literal);
Text_t expr_as_text(Text_t expr, type_t *t, Text_t color);
-MACROLIKE Text_t quoted_str(const char *str) { return Text$quoted(Text$from_str(str), false, Text("\"")); }
-MACROLIKE Text_t quoted_text(Text_t text) { return Text$quoted(text, false, Text("\"")); }
+MACROLIKE Text_t quoted_str(const char *str) {
+ return Text$quoted(Text$from_str(str), false, Text("\""));
+}
+MACROLIKE Text_t quoted_text(Text_t text) {
+ return Text$quoted(text, false, Text("\""));
+}