LibJS: Hack the lexer to allow numbers with decimals

This is very hackish and should definitely be improved. :^)
This commit is contained in:
Andreas Kling 2020-04-04 23:13:48 +02:00
commit a860a3f793
Notes: sideshowbarker 2024-07-19 07:55:36 +09:00
2 changed files with 2 additions and 4 deletions

View file

@ -229,7 +229,7 @@ Token Lexer::next()
}
} else if (isdigit(m_current_char)) {
consume();
while (isdigit(m_current_char)) {
while (m_current_char == '.' || isdigit(m_current_char)) {
consume();
}
token_type = TokenType::NumericLiteral;