From 4124047ccec9c299002902750fcb4b6534bbbdca Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 15 Jun 2019 10:04:47 +0900 Subject: Support `&.` at the beginning of the line. --- mrbgems/mruby-compiler/core/parse.y | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index baa69b556..ff4016d8b 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4762,6 +4762,15 @@ parser_yylex(parser_state *p) pushback(p, '.'); goto retry; } + pushback(p, c); + goto normal_newline; + case '&': + if (peek(p, '.')) { + pushback(p, '&'); + goto retry; + } + pushback(p, c); + goto normal_newline; case -1: /* EOF */ case -2: /* end of a file */ goto normal_newline; -- cgit v1.2.3