Ignore:
Timestamp:
Jul 28, 2015, 1:20:40 PM (10 years ago)
Author:
[email protected]
Message:

Misleading error message: "At least one digit must occur after a decimal point"
https://bugs.webkit.org/show_bug.cgi?id=146238

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Interestingly, we had a comment explaining what this error message was
about that is much clearer than the error message itself. This patch
simply replaces the error message with the explanation from the
comment.

  • parser/Lexer.cpp:

(JSC::Lexer<T>::lex):

LayoutTests:

The expected error message in this test has changed.

  • js/basic-strict-mode-expected.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Lexer.cpp

    r186959 r187506  
    21292129        }
    21302130
    2131         // No identifiers allowed directly after numeric literal, e.g. "3in" is bad.
    21322131        if (UNLIKELY(isIdentStart(m_current))) {
    2133             m_lexErrorMessage = ASCIILiteral("At least one digit must occur after a decimal point");
     2132            m_lexErrorMessage = ASCIILiteral("No identifiers allowed directly after numeric literal");
    21342133            token = atEnd() ? UNTERMINATED_NUMERIC_LITERAL_ERRORTOK : INVALID_NUMERIC_LITERAL_ERRORTOK;
    21352134            goto returnError;
Note: See TracChangeset for help on using the changeset viewer.