From 11c560ebccfa3eabb939dafc4139be92edd26842 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 9 Sep 2024 01:14:33 -0400 Subject: More path stuff including some methods --- parse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 454df469..a3f8149b 100644 --- a/parse.c +++ b/parse.c @@ -1321,6 +1321,10 @@ PARSER(parse_path) { } case '$': { const char *interp_start = pos; + + if (pos > chunk_start) + chunk_text = CORD_asprintf("%r%.*s", chunk_text, (size_t)(pos - chunk_start), chunk_start); + if (chunk_text) { ast_t *literal = NewAST(ctx->file, chunk_start, pos, TextLiteral, .cord=chunk_text); chunks = new(ast_list_t, .ast=literal, .next=chunks); -- cgit v1.2.3