зеркало из https://github.com/github/ruby.git
Rename LINEND to EMPTYLN
This commit is contained in:
Родитель
5af5dd4639
Коммит
cc180e9371
8
parse.y
8
parse.y
|
@ -91,7 +91,7 @@ enum lex_state_bits {
|
|||
EXPR_LABEL_bit, /* flag bit, label is allowed. */
|
||||
EXPR_LABELED_bit, /* flag bit, just after a label. */
|
||||
EXPR_FITEM_bit, /* symbol literal as FNAME. */
|
||||
EXPR_LINEND_bit,
|
||||
EXPR_EMPTYLN_bit, /* line contains only whitespace and comments */
|
||||
EXPR_MAX_STATE
|
||||
};
|
||||
/* examine combinations */
|
||||
|
@ -110,7 +110,7 @@ enum lex_state_e {
|
|||
DEF_EXPR(LABEL),
|
||||
DEF_EXPR(LABELED),
|
||||
DEF_EXPR(FITEM),
|
||||
DEF_EXPR(LINEND),
|
||||
DEF_EXPR(EMPTYLN),
|
||||
EXPR_VALUE = EXPR_BEG,
|
||||
EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
|
||||
EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
|
||||
|
@ -8682,7 +8682,7 @@ parser_yylex(struct parser_params *p)
|
|||
space_seen = 1;
|
||||
break;
|
||||
case '#':
|
||||
SET_LEX_STATE(EXPR_LINEND);
|
||||
SET_LEX_STATE(EXPR_EMPTYLN);
|
||||
pushback(p, c);
|
||||
goto retry;
|
||||
case '|':
|
||||
|
@ -10023,7 +10023,7 @@ new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
|
|||
static const char rb_parser_lex_state_names[][13] = {
|
||||
"EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG",
|
||||
"EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS",
|
||||
"EXPR_LABEL", "EXPR_LABELED","EXPR_FITEM", "EXPR_LINEND",
|
||||
"EXPR_LABEL", "EXPR_LABELED","EXPR_FITEM", "EXPR_EMPTYLN",
|
||||
};
|
||||
|
||||
static VALUE
|
||||
|
|
Загрузка…
Ссылка в новой задаче