Skip to content

Commit 4296c77

Browse files
committed
Allow newlines and comments between method calls.
1 parent 4124047 commit 4296c77

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mrbgems/mruby-compiler/core/parse.y

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4757,6 +4757,14 @@ parser_yylex(parser_state *p)
47574757
case '\13': /* '\v' */
47584758
space_seen = 1;
47594759
break;
4760+
case '#': /* comment as a whitespace */
4761+
pushback(p, '#');
4762+
goto retry;
4763+
case '\n': /* consecutive newlines */
4764+
p->lineno++;
4765+
p->column = 0;
4766+
pushback(p, '\n');
4767+
goto retry;
47604768
case '.':
47614769
if (!peek(p, '.')) {
47624770
pushback(p, '.');

0 commit comments

Comments
 (0)