diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-11-11 22:22:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-11-12 15:02:04 +0900 |
| commit | 7c1878669a3efe02e3a0c530805d553e7f7cf1ea (patch) | |
| tree | 4727e22428f5457687c4e42811ada47db9aebd74 /mrbgems/mruby-compiler/core/y.tab.c | |
| parent | 885a87e408a8677832557f0f70d3176f618760aa (diff) | |
| download | mruby-7c1878669a3efe02e3a0c530805d553e7f7cf1ea.tar.gz mruby-7c1878669a3efe02e3a0c530805d553e7f7cf1ea.zip | |
parse.y: should allow newline after `...`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/y.tab.c')
| -rw-r--r-- | mrbgems/mruby-compiler/core/y.tab.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index d316eaefa..e35bb7aa6 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -11916,7 +11916,7 @@ parser_yylex(parser_state *p) case '.': { int is_beg = IS_BEG(); - p->lstate = EXPR_BEG; + p->lstate = EXPR_MID; if ((c = nextc(p)) == '.') { if ((c = nextc(p)) == '.') { return is_beg ? tBDOT3 : tDOT3; @@ -11925,6 +11925,7 @@ parser_yylex(parser_state *p) return is_beg ? tBDOT2 : tDOT2; } pushback(p, c); + p->lstate = EXPR_BEG; if (c >= 0 && ISDIGIT(c)) { yyerror(p, "no .<digit> floating literal anymore; put 0 before dot"); } |
