diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-17 22:08:05 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-17 22:08:05 -0400 |
| commit | 0f70411cbf6548febfc0f664db72a246a92d4225 (patch) | |
| tree | b7b396c083db6ab0ee3913c0bae54dfae1d20dd7 | |
| parent | 6905f759e5cdbbfa7e16cf183d01ca1f8a858f71 (diff) | |
Fix doctests with functions
| -rw-r--r-- | compile.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -229,10 +229,11 @@ CORD compile_statement(env_t *env, ast_t *ast) (int64_t)(test->expr->end - test->expr->file->text)); } else { return CORD_asprintf( - "{ // Test:\n%r $expr = %r;\n" + "{ // Test:\n" + "%r = %r;\n" "$test(&$expr, %r, %r, %r, %ld, %ld);\n" "}", - compile_type(env, expr_t), + compile_declaration(env, expr_t, "$expr"), compile(env, test->expr), compile_type_info(env, expr_t), compile(env, WrapAST(test->expr, TextLiteral, .cord=output)), |
