[Webkit-unassigned] [Bug 152697] New: Improve unexpected end of script parse error, include expected token

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 10:42:19 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152697

            Bug ID: 152697
           Summary: Improve unexpected end of script parse error, include
                    expected token
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: mark.lam at apple.com, sbarati at apple.com

* SUMMARY
Improve unexpected end of script parse error, include expected token.

The generic "Unexpected end of script" / "Unexpected EOF" errors could be more helpful, and inform what token was missing / expected.

Some examples:

  • inside of function parameter list missing a trailing ')'
  • inside of a block, missing a trailing '}'
  • inside of a string/template string, missing the trailing quote

* TESTS
jsc> print(1
... 
Unexpected end of script:3

jsc> if (1) {
... 
Unexpected end of script:3

jsc> `test
...
Unexpected EOF:2

jsc> 'test
Unexpected EOF:1

jsc> [1
... 
Unexpected end of script:3

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160104/eb1ab1c3/attachment.html>


More information about the webkit-unassigned mailing list