From 1cec086a6034ad546977cae7aeaf4bb876d21970 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 16:54:36 -0400 Subject: Deprecate `>> x ... = val` form of doctests and rename them to 'debug logs', also add multi-expression support --- src/formatter/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/formatter/utils.c') diff --git a/src/formatter/utils.c b/src/formatter/utils.c index bbe74d7f..9cd0227d 100644 --- a/src/formatter/utils.c +++ b/src/formatter/utils.c @@ -44,16 +44,16 @@ CONSTFUNC int suggested_blank_lines(ast_t *first, ast_t *second) { for (;;) { if (first->tag == Declare && Match(first, Declare)->value) { first = Match(first, Declare)->value; - } else if (first->tag == DocTest && Match(first, DocTest)->expr && Match(first, DocTest)->expected == NULL) { - first = Match(first, DocTest)->expr; + } else if (first->tag == DebugLog) { + return 1; } else break; } for (;;) { if (second->tag == Declare && Match(second, Declare)->value) { second = Match(second, Declare)->value; - } else if (second->tag == DocTest && Match(second, DocTest)->expr && Match(second, DocTest)->expected == NULL) { - second = Match(second, DocTest)->expr; + } else if (second->tag == DebugLog) { + return 1; } else break; } -- cgit v1.2.3