aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-10 09:42:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-10 09:42:27 +0000
commite2bdf86319418d4195ad1f4b386dff682184e5eb (patch)
tree77956d46770060a490b6ab04752fff7b1f26d673 /parse.y
parent5ce428bd18599e8135632aded64c51a8b60a9a3f (diff)
downloadruby-e2bdf86319418d4195ad1f4b386dff682184e5eb.tar.gz
Rename DOTQ to ANDDOT
* defs/id.def, parse.y: Switch internal token name to reflect current form of safe-call operator. [Fix GH-1090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index 4397540ab7..04f72d1aeb 100644
--- a/parse.y
+++ b/parse.y
@@ -371,7 +371,7 @@ static int parser_yyerror(struct parser_params*, const char*);
#define ruby_coverage (parser->coverage)
#endif
-#define CALL_Q_P(q) ((q) == tDOTQ)
+#define CALL_Q_P(q) ((q) == tANDDOT)
#define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
#define NEW_QCALL(q,r,m,a) NEW_NODE(NODE_CALL_Q(q),r,m,a)
@@ -875,7 +875,7 @@ static void token_info_pop(struct parser_params*, const char *token, size_t len)
%token tASET RUBY_TOKEN(ASET) "[]="
%token tLSHFT RUBY_TOKEN(LSHFT) "<<"
%token tRSHFT RUBY_TOKEN(RSHFT) ">>"
-%token tDOTQ RUBY_TOKEN(DOTQ) "&."
+%token tANDDOT RUBY_TOKEN(ANDDOT) "&."
%token tCOLON2 "::"
%token tCOLON3 ":: at EXPR_BEG"
%token <id> tOP_ASGN /* +=, -= etc. */
@@ -5117,12 +5117,12 @@ call_op : '.'
$$ = ripper_id2sym('.');
%*/
}
- | tDOTQ
+ | tANDDOT
{
/*%%%*/
- $$ = tDOTQ;
+ $$ = tANDDOT;
/*%
- $$ = ripper_id2sym(idDOTQ);
+ $$ = ripper_id2sym(idANDDOT);
%*/
}
;
@@ -8278,7 +8278,7 @@ parser_yylex(struct parser_params *parser)
}
else if (c == '.') {
lex_state = EXPR_DOT;
- return tDOTQ;
+ return tANDDOT;
}
pushback(c);
if (IS_SPCARG(c)) {