mirror of https://github.com/arendst/Tasmota.git
Fix Berry lexer regression
This commit is contained in:
parent
7ad3a0e45b
commit
8348b3fb25
|
@ -336,7 +336,11 @@ static btokentype scan_decimal(blexer *lexer)
|
|||
{
|
||||
btokentype type = TokenInteger;
|
||||
match(lexer, is_digit);
|
||||
if (decimal_dots(lexer) || scan_realexp(lexer)) {
|
||||
/* decimal_dots() and scan_realexp() have side effect, so we call each explicitly */
|
||||
/* to prevent binary shortcut if the first is true */
|
||||
bbool has_decimal_dots = decimal_dots(lexer);
|
||||
bbool is_realexp = scan_realexp(lexer);
|
||||
if (has_decimal_dots || is_realexp) {
|
||||
type = TokenReal;
|
||||
}
|
||||
lexer->buf.s[lexer->buf.len] = '\0';
|
||||
|
|
Loading…
Reference in New Issue