From 566356d82ed97c274b7985cafdce6704520c8ff0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 28 Sep 2024 14:45:15 -0400 Subject: Fix parsing of REPL code --- parse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parse.c b/parse.c index 09a7eb20..cad60f6d 100644 --- a/parse.c +++ b/parse.c @@ -2382,10 +2382,12 @@ PARSER(parse_use) { } ast_t *parse_file(const char *path, jmp_buf *on_err) { - const char *resolved = resolve_path(path, ".", "."); - if (!resolved) - errx(1, "Could not resolve path: %s", path); - path = resolved; + if (path[0] != '<') { + const char *resolved = resolve_path(path, ".", "."); + if (!resolved) + errx(1, "Could not resolve path: %s", path); + path = resolved; + } // NOTE: this cache leaks a bounded amount of memory. The cache will never // hold more than PARSE_CACHE_SIZE entries (see below), but each entry's // AST holds onto a reference to the file it came from, so they could -- cgit v1.2.3