aboutsummaryrefslogtreecommitdiff
path: root/src/formatter/formatter.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-06 14:46:15 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-06 14:46:15 -0400
commitd8a48f64111f542f3afeb5d6e47ff092f9278d9f (patch)
tree07c364503025bb2a26edd7b26f1ba9e8d25340f6 /src/formatter/formatter.h
parent12345a85d9c7d7a56ddf323247a4bdf347021b73 (diff)
parent73246764f88f6f652316ee0c138a990d836698a7 (diff)
Merge branch 'main' into optional-list-indexing
Diffstat (limited to 'src/formatter/formatter.h')
-rw-r--r--src/formatter/formatter.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/formatter/formatter.h b/src/formatter/formatter.h
new file mode 100644
index 00000000..a8f9013a
--- /dev/null
+++ b/src/formatter/formatter.h
@@ -0,0 +1,13 @@
+// This code defines functions for transforming ASTs back into Tomo source text
+
+#pragma once
+
+#include <stdbool.h>
+
+#include "../ast.h"
+#include "../stdlib/datatypes.h"
+
+Text_t format_file(const char *path);
+Text_t format_code(ast_t *ast, Table_t comments, Text_t indentation);
+Text_t format_namespace(ast_t *namespace, Table_t comments, Text_t indent);
+OptionalText_t format_inline_code(ast_t *ast, Table_t comments);