Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Issue 1236803003: Improve parsing errors related to related to destructuring bind (Closed)

Created:
5 years, 5 months ago by Dan Ehrenberg
Modified:
5 years, 5 months ago
Reviewers:
rossberg, adamk
CC:
v8-dev, adamk, caitp (gmail)
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Improve parsing errors related to destructuring bind For destructuring bind, the parser needs to complain about things which are inappropriate to have on the left-hand side. Previously, regexp literals and template literals were let through the parser inappropriately. This patch turns those into errors. This patch also fixes off-by-one errors in reporting the location of this type of error for strings and numbers. Before the patch, the error would look like: d8> var {x: 3} = {x: 4} (d8):1: SyntaxError: Unexpected number var {x: 3} = {x: 4} ^ SyntaxError: Unexpected number And with the patch, the error is d8> var {x: 3} = {x: 4} (d8):1: SyntaxError: Unexpected number var {x: 3} = {x: 4} ^ SyntaxError: Unexpected number R=rossberg Committed: https://crrev.com/9d6ab46aefdd2fac057e443ff5dd8ee81f570e39 Cr-Commit-Position: refs/heads/master@{#29661}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -2 lines) Patch
M src/messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/preparser.h View 3 chunks +9 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Dan Ehrenberg
5 years, 5 months ago (2015-07-14 02:50:55 UTC) #1
Dan Ehrenberg
5 years, 5 months ago (2015-07-14 20:29:14 UTC) #3
adamk
Code looks fine. Your CL description says "left-hand side", where I think you mean "right-hand ...
5 years, 5 months ago (2015-07-14 21:06:22 UTC) #4
Dan Ehrenberg
On 2015/07/14 21:06:22, adamk wrote: > Code looks fine. > > Your CL description says ...
5 years, 5 months ago (2015-07-14 21:18:59 UTC) #5
adamk
ah, makes sense, lgtm
5 years, 5 months ago (2015-07-14 21:21:36 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1236803003/1
5 years, 5 months ago (2015-07-14 21:26:16 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 5 months ago (2015-07-14 21:57:45 UTC) #9
commit-bot: I haz the power
5 years, 5 months ago (2015-07-14 21:57:59 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9d6ab46aefdd2fac057e443ff5dd8ee81f570e39
Cr-Commit-Position: refs/heads/master@{#29661}

Powered by Google App Engine
This is Rietveld 408576698