mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler (parser_yylex): skip sign if bigint starts with +
To reserve memory (1 byte) and avoid error (fixed by 11cff8f).
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user