diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index b9b723112..8ec816a3b 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -5762,10 +5762,13 @@ parser_yylex(parser_state *p) is_float = seen_point = seen_e = nondigit = 0; p->lstate = EXPR_END; newtok(p); - if (c == '-' || c == '+') { + if (c == '-') { tokadd(p, c); c = nextc(p); } + else if (c == '+') { + c = nextc(p); + } if (c == '0') { #define no_digits() do {yyerror(NULL, p,"numeric literal without digits"); return 0;} while (0) int start = toklen(p);