diff options
Diffstat (limited to 'src/formatter/formatter.h')
| -rw-r--r-- | src/formatter/formatter.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/formatter/formatter.h b/src/formatter/formatter.h index 83bb9e56..a8f9013a 100644 --- a/src/formatter/formatter.h +++ b/src/formatter/formatter.h @@ -2,25 +2,12 @@ #pragma once +#include <stdbool.h> + #include "../ast.h" #include "../stdlib/datatypes.h" -#define MAX_WIDTH 100 - -#define must(expr) \ - ({ \ - OptionalText_t _expr = expr; \ - if (_expr.length < 0) return NONE_TEXT; \ - (Text_t) _expr; \ - }) - -extern const Text_t single_indent; - 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); - -OptionalText_t next_comment(Table_t comments, const char **pos, const char *end); -bool range_has_comment(const char *start, const char *end, Table_t comments); -OptionalText_t next_comment(Table_t comments, const char **pos, const char *end); -void add_line(Text_t *code, Text_t line, Text_t indent); |
