diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-28 14:45:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-28 14:45:15 -0400 |
| commit | 566356d82ed97c274b7985cafdce6704520c8ff0 (patch) | |
| tree | 40c666d923c25653239faf412aa586c52b4f8c24 /parse.c | |
| parent | 8f717fe9f498642ca6f857ef329d73760b98d44c (diff) | |
Fix parsing of REPL code
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 |
