diff options
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 4 | ||||
| -rw-r--r-- | mrbgems/mruby-compiler/core/y.tab.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 53cd4ffad..3551e8385 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -5856,6 +5856,10 @@ parser_yylex(parser_state *p) errno = 0; } suffix = number_literal_suffix(p); + if (seen_e && (suffix & NUM_SUFFIX_R)) { + pushback(p, 'r'); + suffix &= ~NUM_SUFFIX_R; + } pylval.nd = new_float(p, tok(p), suffix); return tFLOAT; #endif diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index 8942ad644..54db8b85c 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -11892,6 +11892,10 @@ parser_yylex(parser_state *p) errno = 0; } suffix = number_literal_suffix(p); + if (seen_e && (suffix & NUM_SUFFIX_R)) { + pushback(p, 'r'); + suffix &= ~NUM_SUFFIX_R; + } pylval.nd = new_float(p, tok(p), suffix); return tFLOAT; #endif |
