mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
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;
|
btokentype type = TokenInteger;
|
||||||
match(lexer, is_digit);
|
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;
|
type = TokenReal;
|
||||||
}
|
}
|
||||||
lexer->buf.s[lexer->buf.len] = '\0';
|
lexer->buf.s[lexer->buf.len] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user