Bug 133998

Summary: Fix error messages for incorrect hex literals
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: dbates, mark.lam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dbates: review-

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.