diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-11 15:31:30 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-11 15:31:30 -0500 |
| commit | 37a0493b59cfa5dfb21c1f5c39b13b301770e126 (patch) | |
| tree | 5dca24bf8e9f226f72bb90702e8d33e3a8b6aa1e /parse.c | |
| parent | 23898b76180b3bbcc7e482492f2af0c59e3efe12 (diff) | |
String literals as cords
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |
