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

Issue 2116853002: Parser support for trailing commas (#26647). (Closed)

Created:
4 years, 5 months ago by pquitslund
Modified:
4 years, 5 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org, danrubel
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Parser support for trailing commas (#26647). Adds parser support for trailing commas in parameter and argument lists. Meta-tracking issue: https://github.com/dart-lang/sdk/issues/26644 In most cases, errors were preserved (and tested) across parsers with and without the flag set. (The exception is a formal paramater list with an extra comma, like `(a,,)` which with trailing comma support enabled only reports a missing identifier; needless to say this is captured in a test and is up for further debate.) Amazingly (and for better or worse), turning this option on in the parser (`parseTrailingCommas = true`) produces NO errors in the analyzer and server tests. BUG=26647 R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/aea4632375d9cbedff2b3ce87dd8b46b1e2645be

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -7 lines) Patch
M pkg/analyzer/lib/src/generated/parser.dart View 2 chunks +18 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 11 chunks +121 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
pquitslund
4 years, 5 months ago (2016-07-01 20:18:39 UTC) #3
Brian Wilkerson
lgtm. I'm surprised (and bothered) by the fact that there were no completion failures.
4 years, 5 months ago (2016-07-01 20:40:08 UTC) #4
pquitslund
4 years, 5 months ago (2016-07-01 20:50:15 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
aea4632375d9cbedff2b3ce87dd8b46b1e2645be (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698