@@ -10946,7 +10946,15 @@ parse_symbol(pm_parser_t *parser, pm_lex_mode_t *lex_mode, pm_lex_state_t next_s
10946
10946
}
10947
10947
10948
10948
// Now we can parse the first part of the symbol.
10949
- pm_node_t *part = parse_string_part(parser);
10949
+ pm_node_t *part;
10950
+ if (match1(parser, PM_TOKEN_STRING_CONTENT)) {
10951
+ pm_token_t opening = not_provided(parser);
10952
+ pm_token_t closing = not_provided(parser);
10953
+ part = (pm_node_t *) pm_string_node_create_current_string(parser, &opening, &parser->current, &closing);
10954
+ parser_lex(parser);
10955
+ } else {
10956
+ part = parse_string_part(parser);
10957
+ }
10950
10958
10951
10959
// If we got a string part, then it's possible that we could transform
10952
10960
// what looks like an interpolated symbol into a regular symbol.
@@ -10963,7 +10971,16 @@ parse_symbol(pm_parser_t *parser, pm_lex_mode_t *lex_mode, pm_lex_state_t next_s
10963
10971
if (part) pm_node_list_append(&node_list, part);
10964
10972
10965
10973
while (!match2(parser, PM_TOKEN_STRING_END, PM_TOKEN_EOF)) {
10966
- if ((part = parse_string_part(parser)) != NULL) {
10974
+ if (match1(parser, PM_TOKEN_STRING_CONTENT)) {
10975
+ pm_token_t opening = not_provided(parser);
10976
+ pm_token_t closing = not_provided(parser);
10977
+ part = (pm_node_t *) pm_string_node_create_current_string(parser, &opening, &parser->current, &closing);
10978
+ parser_lex(parser);
10979
+ } else {
10980
+ part = parse_string_part(parser);
10981
+ }
10982
+
10983
+ if (part != NULL) {
10967
10984
pm_node_list_append(&node_list, part);
10968
10985
}
10969
10986
}
0 commit comments