Bug 225308

Summary: Fix syntax error message for AUTOPLUSPLUS token.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
mark.lam: review-, ews-feeder: commit-queue-
proposed patch. saam: review+, ews-feeder: commit-queue-

Description Mark Lam 2021-05-03 08:33:05 PDT
These tokens don't current add any value, but actually produces a bug where a SyntaxError due to mis-applied ++ operator mentions "--" instead of "++".

rdar://76830934
Comment 1 Mark Lam 2021-05-03 08:47:56 PDT
Created attachment 427563 [details]
proposed patch.
Comment 2 Mark Lam 2021-05-03 10:36:40 PDT
Comment on attachment 427563 [details]
proposed patch.

I'm gonna investigate why there are EWS failures.
Comment 3 Mark Lam 2021-05-03 14:28:49 PDT
I was wrong about AUTOPLUSPLUS not being needed.  It’s needed to distinquish this:
```
statement ++ stuff
```
from this:
```
statement
++stuff
```
AUTOPLUSPLUS tells us that that there’s a `\n` there, which tells us that the ++ is a prefix for the next token, not a postfix for the last one.

So, the real bug is that the SyntaxError message needs to take into account AUTOPLUSPLUS.
Comment 4 Mark Lam 2021-05-03 14:47:08 PDT
Created attachment 427605 [details]
proposed patch.
Comment 5 Mark Lam 2021-05-03 19:38:35 PDT
Thanks for the review.  The AS Mac failures are not related.

Landed in r276942: <http://trac.webkit.org/r276942>.