diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 16:54:36 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 16:54:36 -0400 |
| commit | 1cec086a6034ad546977cae7aeaf4bb876d21970 (patch) | |
| tree | cd2889aea7ca830359ba329a3f82b96e706bcdee /src/formatter/utils.c | |
| parent | 0ab878ff4f72f7f6f6f64c1fc5d8023cd19fbe82 (diff) | |
Deprecate `>> x ... = val` form of doctests and rename them to 'debugdoctests-to-debuglog
logs', also add multi-expression support
Diffstat (limited to 'src/formatter/utils.c')
| -rw-r--r-- | src/formatter/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |
