diff --git a/parse.y b/parse.y index b8d5e6cbf1..49833e0bbe 100644 --- a/parse.y +++ b/parse.y @@ -8072,6 +8072,7 @@ parse_ident(struct parser_params *parser, int c, int cmd_state) ident = tokenize_ident(parser, last_state); if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && + (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */ lvar_defined(ident)) { SET_LEX_STATE(EXPR_END|EXPR_LABEL); }