mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: fix state after left brace
* parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block), `tLBRACE` (primary block) also does not accept a label. only hash brace accepts a label. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3a12eb82b2
commit
543ed3652f
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -8082,7 +8082,7 @@ parser_yylex(struct parser_params *p)
|
|||
c = tLBRACE; /* hash */
|
||||
COND_PUSH(0);
|
||||
CMDARG_PUSH(0);
|
||||
SET_LEX_STATE(c == tLBRACE_ARG ? EXPR_BEG : EXPR_BEG|EXPR_LABEL);
|
||||
SET_LEX_STATE(c != tLBRACE ? EXPR_BEG : EXPR_BEG|EXPR_LABEL);
|
||||
if (c != tLBRACE) p->command_start = TRUE;
|
||||
return c;
|
||||
|
||||
|
|
Loading…
Reference in a new issue