summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-12 05:17:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-12 05:17:06 +0000
commit68e16ddd7961b86e5013e62ae2954e88638de058 (patch)
tree45140bfa199d296d26a0d0cb39740c41d1e5261a /parse.y
parent88edab89f4a0cabc9e10f2b8c8cf81cc3eda68c9 (diff)
parse.y: ANDDOT fluent interface
* parse.y (parser_yylex): ANDDOT at the head of the line denote line continuation from previous one to support fluent interface, as well as single dot. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 0dc04783b9..56e424359c 100644
--- a/parse.y
+++ b/parse.y
@@ -8034,9 +8034,10 @@ parser_yylex(struct parser_params *parser)
case '\13': /* '\v' */
space_seen = 1;
break;
+ case '&':
case '.': {
dispatch_delayed_token(tIGNORED_NL);
- if (!peek('.')) {
+ if (peek('.') == (c == '&')) {
pushback(c);
dispatch_scan_event(tSP);
goto retry;