From 37a0493b59cfa5dfb21c1f5c39b13b301770e126 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Feb 2024 15:31:30 -0500 Subject: String literals as cords --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index c24cd071..9abbd6e6 100644 --- a/parse.c +++ b/parse.c @@ -915,7 +915,7 @@ PARSER(parse_string) { for (; pos < ctx->file->text + ctx->file->len && *pos != close_quote; ++pos) { if (*pos == start_interp) { if (chunk) { - ast_t *literal = NewAST(ctx->file, chunk_start, pos, StringLiteral, .str=CORD_to_const_char_star(chunk)); + ast_t *literal = NewAST(ctx->file, chunk_start, pos, StringLiteral, .cord=chunk); chunks = new(ast_list_t, .ast=literal, .next=chunks); chunk = NULL; } @@ -958,7 +958,7 @@ PARSER(parse_string) { } if (chunk) { - ast_t *literal = NewAST(ctx->file, chunk_start, pos, StringLiteral, .str=CORD_to_const_char_star(chunk)); + ast_t *literal = NewAST(ctx->file, chunk_start, pos, StringLiteral, .cord=chunk); chunks = new(ast_list_t, .ast=literal, .next=chunks); chunk = NULL; } -- cgit v1.2.3