1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

LibJS: Unprefixed octal numbers are a syntax error in strict mode

This commit is contained in:
Linus Groh 2020-10-19 18:01:28 +01:00 committed by Andreas Kling
parent 602eb98479
commit 46cc1f718e
4 changed files with 24 additions and 4 deletions

View file

@ -422,8 +422,7 @@ Token Lexer::next()
consume();
token_type = TokenType::BigIntLiteral;
} else if (isdigit(m_current_char)) {
// octal without 'O' prefix. Forbidden in 'strict mode'
// FIXME: We need to make sure this produces a syntax error when in strict mode
// octal without '0o' prefix. Forbidden in 'strict mode'
do {
consume();
} while (isdigit(m_current_char));