mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Omit EXPR_
prefix to show lex_state
This commit is contained in:
parent
9247f6fcc0
commit
1f7cb4bee9
1 changed files with 6 additions and 5 deletions
11
parse.y
11
parse.y
|
@ -10012,11 +10012,12 @@ new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
|
|||
}
|
||||
#endif /* !RIPPER */
|
||||
|
||||
|
||||
#ifndef RIPPER
|
||||
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",
|
||||
static const char rb_parser_lex_state_names[][8] = {
|
||||
"BEG", "END", "ENDARG", "ENDFN", "ARG",
|
||||
"CMDARG", "MID", "FNAME", "DOT", "CLASS",
|
||||
"LABEL", "LABELED","FITEM",
|
||||
};
|
||||
|
||||
static VALUE
|
||||
|
@ -10024,7 +10025,7 @@ append_lex_state_name(enum lex_state_e state, VALUE buf)
|
|||
{
|
||||
int i, sep = 0;
|
||||
unsigned int mask = 1;
|
||||
static const char none[] = "EXPR_NONE";
|
||||
static const char none[] = "NONE";
|
||||
|
||||
for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
|
||||
if ((unsigned)state & mask) {
|
||||
|
|
Loading…
Reference in a new issue