The `lex_state` after literals should be `EXPR_ENDARG`.
@@ -2853,6 +2853,7 @@ words : tWORDS_BEG tSTRING
symbol : basic_symbol
{
+ p->lstate = EXPR_ENDARG;
$$ = new_sym(p, $1);
}
| tSYMBEG tSTRING_BEG string_rep tSTRING
@@ -2864,7 +2865,6 @@ symbol : basic_symbol
basic_symbol : tSYMBEG sym
{
- p->lstate = EXPR_END;
$$ = $2;
}
;
@@ -4125,7 +4125,7 @@ parse_string(parser_state *p)
}
tokfix(p);
- p->lstate = EXPR_END;
+ p->lstate = EXPR_ENDARG;
end_strterm(p);
if (type & STR_FUNC_XQUOTE) {
@@ -4612,7 +4612,7 @@ parser_yylex(parser_state *p)
}
tokfix(p);
pylval.nd = new_str(p, tok(p), toklen(p));
- p->lstate = EXPR_END;
+ p->lstate = EXPR_ENDARG;
return tCHAR;
case '&':
@@ -4761,7 +4761,7 @@ parser_yylex(parser_state *p)
int is_float, seen_point, seen_e, nondigit;
is_float = seen_point = seen_e = nondigit = 0;
- p->lstate = EXPR_END;
+ p->lstate = EXPR_ENDARG;
newtok(p);
if (c == '-' || c == '+') {
tokadd(p, c);
