aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-11 15:31:30 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-11 15:31:30 -0500
commit37a0493b59cfa5dfb21c1f5c39b13b301770e126 (patch)
tree5dca24bf8e9f226f72bb90702e8d33e3a8b6aa1e /parse.c
parent23898b76180b3bbcc7e482492f2af0c59e3efe12 (diff)
String literals as cords
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
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;
}