summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y3
-rw-r--r--mrbgems/mruby-compiler/core/y.tab.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 0a86a5c19..e70621723 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -5693,7 +5693,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;
@@ -5702,6 +5702,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");
}
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");
}