Bug 225308 - Fix syntax error message for AUTOPLUSPLUS token.
Summary: Fix syntax error message for AUTOPLUSPLUS token.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-03 08:33 PDT by Mark Lam
Modified: 2021-05-03 19:38 PDT (History)
6 users (show)

See Also:


Attachments
proposed patch. (6.10 KB, patch)
2021-05-03 08:47 PDT, Mark Lam
mark.lam: review-
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
proposed patch. (3.91 KB, patch)
2021-05-03 14:47 PDT, Mark Lam
saam: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.