Bug 133998 - Fix error messages for incorrect hex literals
Summary: Fix error messages for incorrect hex literals
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-17 13:50 PDT by Oliver Hunt
Modified: 2014-06-17 16:31 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.79 KB, patch)
2014-06-17 13:51 PDT, Oliver Hunt
dbates: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2014-06-17 13:50:03 PDT
Fix error messages for incorrect hex literals
Comment 1 Oliver Hunt 2014-06-17 13:51:43 PDT
Created attachment 233259 [details]
Patch
Comment 2 Mark Lam 2014-06-17 14:14:33 PDT
Comment on attachment 233259 [details]
Patch

r=me
Comment 3 Daniel Bates 2014-06-17 14:21:08 PDT
Comment on attachment 233259 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233259&action=review

> Source/JavaScriptCore/parser/Lexer.cpp:1657
> +                m_lexErrorMessage = "No space between hexadecimal literal and identifier";

Can we add a test for this new error message?
Comment 4 Daniel Bates 2014-06-17 14:24:53 PDT
Comment on attachment 233259 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233259&action=review

> Source/JavaScriptCore/parser/ParserTokens.h:153
> +    INVALID_HEX_NUMBER_ERRORTOK = 11 | ErrorTokenFlag

For your consideration, I suggest that we add a trailing comma (,) to the end of this line so that we can avoid touching the last line of this enum (which creates noise when using svn/git blame) when adding a new enum value.
Comment 5 Oliver Hunt 2014-06-17 15:30:26 PDT
Committed r170079: <http://trac.webkit.org/changeset/170079>
Comment 6 Daniel Bates 2014-06-17 16:31:04 PDT
(In reply to comment #5)
> Committed r170079: <http://trac.webkit.org/changeset/170079>

For completeness, this changeset includes an additional test case called, LayoutTests/js/parser-error-messages.html, that tests for the syntax error "No space between hexadecimal literal and identifier" and hence addresses comment #3.