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

Issue 2999303002: map fasta error codes to analyzer (Closed)

Created:
3 years, 4 months ago by danrubel
Modified:
3 years, 3 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org, dart-uxr+reviews_google.com, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

map fasta error codes to analyzer Rather than have multple fine grained error codes for each type of modifier in each situation, this CL adds a new analyzer ParserErrorCode.EXTRANEOUS_MODIFIER parallel to the fast parser error code and updates the AstBuilder to generate that error rather than ParserErrorCode.ABSTRACT_CLASS_MEMBER. My goal is to review each analyzer error code similar to ParserErrorCode.ABSTRACT_CLASS_MEMBER and map each to the same ParserErrorCode.EXTRANEOUS_MODIFIER error code. R=paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/8786656783866fbfb2bcb12490cd036bfe0c8ca4

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -44 lines) Patch
M pkg/analyzer/lib/error/error.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M pkg/analyzer/lib/src/dart/error/syntactic_errors.dart View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/fasta/ast_builder.dart View 1 2 2 chunks +20 lines, -9 lines 0 comments Download
M pkg/analyzer/test/generated/parser_fasta_test.dart View 1 2 2 chunks +5 lines, -24 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 2 5 chunks +9 lines, -9 lines 0 comments Download
M pkg/front_end/lib/src/fasta/fasta_codes_generated.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M pkg/front_end/messages.yaml View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
danrubel
3 years, 4 months ago (2017-08-20 16:57:56 UTC) #2
Paul Berry
lgtm Code lgtm, and in general I am in favor of this approach. However I ...
3 years, 4 months ago (2017-08-21 05:05:47 UTC) #3
ahe
On 2017/08/21 05:05:47, Paul Berry wrote: > lgtm > > Code lgtm, and in general ...
3 years, 4 months ago (2017-08-22 13:03:48 UTC) #4
danrubel
Committed patchset #4 (id:60001) manually as 8786656783866fbfb2bcb12490cd036bfe0c8ca4 (presubmit successful).
3 years, 3 months ago (2017-08-25 13:00:26 UTC) #6
danrubel
3 years, 3 months ago (2017-09-07 19:56:16 UTC) #7
Message was sent while issue was closed.
On 2017/08/21 05:05:47, Paul Berry wrote:
> lgtm
> 
> Code lgtm, and in general I am in favor of this approach.
> 
> However I have a concern specifically about the case of extraneous "abstract"
> modifiers.  When we talk about a method in an abstract class that lacks a
> definition, we tend to call it an "abstract method", and as a result even
> seasoned Dart programmers sometimes make the error of putting the "abstract"
> keyword on a method instead of (or in addition to) putting it on the class. 
(I
> do it myself occasionally).  Since it's such an easy error to make, it seems
> like it might be nice to keep a special error code for it, so that we can give
> the user a nice informative error message.
> 
> I agree, however, that in general we don't need a special error code for every
> possible situation where a modifier appears where it is not expected.

Fixed in https://dart-review.googlesource.com/c/sdk/+/4143

Powered by Google App Engine
This is Rietveld 408576698