diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-03 15:19:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-03 15:19:59 -0400 |
| commit | 8d173710fe8cfd96bd54f9dd1cf0eccacfdd6e73 (patch) | |
| tree | e93cf2ad599ed1378366303d1162a60fec5090db /src/repl.c | |
| parent | cedae3039c8d67568b5ac35833c10cbfc1c7cb23 (diff) | |
Deprecate heap_strf
Diffstat (limited to 'src/repl.c')
| -rw-r--r-- | src/repl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,14 +63,14 @@ void repl(void) code = GC_strdup(line); while ((len=getline(&line, &buf_size, stdin)) >= 0) { if (len == 1) break; - code = heap_strf("%s%s", code, line); + code = String(code, line); printf("\x1b[33;1m..\x1b[m "); fflush(stdout); } } else { - code = heap_strf("func main(): >> %s", code); + code = String("func main(): >> ", code); } - ast_t *ast = parse_file(heap_strf("<code>%s", code), &on_err); + ast_t *ast = parse_file(String("<code>", code), &on_err); ast_t *doctest = Match(Match(Match(ast, Block)->statements->ast, FunctionDef)->body, Block)->statements->ast; if (doctest->tag == DocTest) doctest->__data.DocTest.skip_source = 1; run(env, doctest); |
