Merge pull request #3824 from nobu/bug/paren_arg

Bug/paren arg
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-10-09 12:39:13 +09:00
committed by GitHub
+4 -3
View File
@@ -5078,6 +5078,9 @@ parser_yylex(parser_state *p)
else if (IS_SPCARG(-1)) {
c = tLPAREN_ARG;
}
else if (p->lstate == EXPR_END && space_seen) {
c = tLPAREN_ARG;
}
p->paren_nest++;
COND_PUSH(0);
CMDARG_PUSH(0);
@@ -5497,11 +5500,9 @@ parser_yylex(parser_state *p)
mrb_sym ident = intern_cstr(tok(p));
pylval.id = ident;
#if 0
if (last_state != EXPR_DOT && islower(tok(p)[0]) && lvar_defined(ident)) {
if (last_state != EXPR_DOT && islower(tok(p)[0]) && local_var_p(p, ident)) {
p->lstate = EXPR_END;
}
#endif
}
return result;
}