From cfce376f585e0cd0231e95843617f75bd65b6c07 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 28 Dec 2025 17:27:05 -0500 Subject: Change autoformatter to no longer allow single-line functions --- src/parse/expressions.c | 4 +++- src/parse/utils.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/parse') diff --git a/src/parse/expressions.c b/src/parse/expressions.c index d031c49f..27e44129 100644 --- a/src/parse/expressions.c +++ b/src/parse/expressions.c @@ -195,7 +195,9 @@ ast_t *parse_term(parse_ctx_t *ctx, const char *pos) { return term; } -ast_t *parse_expr(parse_ctx_t *ctx, const char *pos) { return parse_infix_expr(ctx, pos, 0); } +ast_t *parse_expr(parse_ctx_t *ctx, const char *pos) { + return parse_infix_expr(ctx, pos, 0); +} ast_t *parse_extended_expr(parse_ctx_t *ctx, const char *pos) { ast_t *expr = NULL; diff --git a/src/parse/utils.c b/src/parse/utils.c index f1b518ca..03e0ebcd 100644 --- a/src/parse/utils.c +++ b/src/parse/utils.c @@ -41,7 +41,9 @@ size_t some_not(const char **pos, const char *forbid) { return len; } -size_t spaces(const char **pos) { return some_of(pos, " \t"); } +size_t spaces(const char **pos) { + return some_of(pos, " \t"); +} void whitespace(parse_ctx_t *ctx, const char **pos) { while (some_of(pos, " \t\r\n") || comment(ctx, pos)) @@ -93,7 +95,9 @@ const char *get_id(const char **inout) { return word; } -PUREFUNC const char *eol(const char *str) { return str + strcspn(str, "\r\n"); } +PUREFUNC const char *eol(const char *str) { + return str + strcspn(str, "\r\n"); +} bool comment(parse_ctx_t *ctx, const char **pos) { if ((*pos)[0] == '#') { -- cgit v1.2.3