зеркало из https://github.com/github/ruby.git
Introduce inline_primary rule
Introduce inline_primary rule to merge the same BNF pattern
This commit is contained in:
Родитель
9c8c140d73
Коммит
d278d352f9
15
parse.y
15
parse.y
|
@ -4374,7 +4374,8 @@ mrhs : args ',' arg_value
|
|||
}
|
||||
;
|
||||
|
||||
primary : literal
|
||||
%rule %inline inline_primary
|
||||
: literal
|
||||
| strings
|
||||
| xstring
|
||||
| regexp
|
||||
|
@ -4382,6 +4383,9 @@ primary : literal
|
|||
| qwords
|
||||
| symbols
|
||||
| qsymbols
|
||||
;
|
||||
|
||||
primary : inline_primary
|
||||
| var_ref
|
||||
| backref
|
||||
| tFID
|
||||
|
@ -5863,14 +5867,7 @@ p_value : p_primitive
|
|||
}
|
||||
;
|
||||
|
||||
p_primitive : literal
|
||||
| strings
|
||||
| xstring
|
||||
| regexp
|
||||
| words
|
||||
| qwords
|
||||
| symbols
|
||||
| qsymbols
|
||||
p_primitive : inline_primary
|
||||
| keyword_variable
|
||||
{
|
||||
if (!($$ = gettable(p, $1, &@$))) $$ = NEW_ERROR(&@$);
|
||||
|
|
Загрузка…
Ссылка в новой задаче