Commit 80e03f3f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3824 from nobu/bug/paren_arg

Bug/paren arg
parents c3c882f6 82983330
...@@ -5078,6 +5078,9 @@ parser_yylex(parser_state *p) ...@@ -5078,6 +5078,9 @@ parser_yylex(parser_state *p)
else if (IS_SPCARG(-1)) { else if (IS_SPCARG(-1)) {
c = tLPAREN_ARG; c = tLPAREN_ARG;
} }
else if (p->lstate == EXPR_END && space_seen) {
c = tLPAREN_ARG;
}
p->paren_nest++; p->paren_nest++;
COND_PUSH(0); COND_PUSH(0);
CMDARG_PUSH(0); CMDARG_PUSH(0);
...@@ -5497,11 +5500,9 @@ parser_yylex(parser_state *p) ...@@ -5497,11 +5500,9 @@ parser_yylex(parser_state *p)
mrb_sym ident = intern_cstr(tok(p)); mrb_sym ident = intern_cstr(tok(p));
pylval.id = ident; pylval.id = ident;
#if 0 if (last_state != EXPR_DOT && islower(tok(p)[0]) && local_var_p(p, ident)) {
if (last_state != EXPR_DOT && islower(tok(p)[0]) && lvar_defined(ident)) {
p->lstate = EXPR_END; p->lstate = EXPR_END;
} }
#endif
} }
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment