From 8d173710fe8cfd96bd54f9dd1cf0eccacfdd6e73 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 3 Apr 2025 15:19:59 -0400 Subject: Deprecate heap_strf --- src/repl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/repl.c') diff --git a/src/repl.c b/src/repl.c index ae12427a..2f5c60f6 100644 --- a/src/repl.c +++ b/src/repl.c @@ -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("%s", code), &on_err); + ast_t *ast = parse_file(String("", 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); -- cgit v1.2.3