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

Issue 2342383002: Initial support for the NNBD proposal (Closed)

Created:
4 years, 3 months ago by Brian Wilkerson
Modified:
4 years, 3 months ago
Reviewers:
Bob Nystrom, scheglov
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed comments and added tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -39 lines) Patch
M pkg/analyzer/lib/dart/ast/ast.dart View 4 chunks +30 lines, -4 lines 0 comments Download
M pkg/analyzer/lib/src/dart/ast/ast.dart View 4 chunks +10 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/dart/ast/utilities.dart View 2 chunks +6 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/generated/parser.dart View 1 23 chunks +128 lines, -22 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 17 chunks +142 lines, -11 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Brian Wilkerson
I suspect that with some careful examination of the grammar we can make this more ...
4 years, 3 months ago (2016-09-16 15:12:54 UTC) #2
scheglov
LGTM https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/generated/parser.dart File pkg/analyzer/lib/src/generated/parser.dart (right): https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/generated/parser.dart#newcode2103 pkg/analyzer/lib/src/generated/parser.dart:2103: void parseFunction(Parser parser) { The name looks like ...
4 years, 3 months ago (2016-09-16 15:29:39 UTC) #3
Brian Wilkerson
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/generated/parser.dart File pkg/analyzer/lib/src/generated/parser.dart (right): https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/generated/parser.dart#newcode2103 pkg/analyzer/lib/src/generated/parser.dart:2103: void parseFunction(Parser parser) { > The name looks like ...
4 years, 3 months ago (2016-09-16 15:47:35 UTC) #4
Brian Wilkerson
ptal
4 years, 3 months ago (2016-09-16 17:25:44 UTC) #5
scheglov
LGTM The potential performance hit is even bigger now, as we clone all tokens after ...
4 years, 3 months ago (2016-09-16 17:32:31 UTC) #6
Brian Wilkerson
Yes. I think we really need to find a more efficient way to perform the ...
4 years, 3 months ago (2016-09-16 17:50:45 UTC) #7
Brian Wilkerson
Committed patchset #2 (id:20001) manually as 7eb7573dc452a62c514f462460e2544569ce01be (presubmit successful).
4 years, 3 months ago (2016-09-16 17:51:24 UTC) #9
Bob Nystrom
4 years, 3 months ago (2016-09-16 21:46:11 UTC) #10
Message was sent while issue was closed.
On 2016/09/16 15:29:39, scheglov wrote:
> LGTM
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/genera...
> File pkg/analyzer/lib/src/generated/parser.dart (right):
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/genera...
> pkg/analyzer/lib/src/generated/parser.dart:2103: void parseFunction(Parser
> parser) {
> The name looks like this function will parse a function :-)
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/lib/src/genera...
> pkg/analyzer/lib/src/generated/parser.dart:2111: token = _skip(token.next,
> parseFunction);
> Out of curiosity - what is an example when just seeing COLON after an
expression
> is not enough?
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/test/generated...
> File pkg/analyzer/test/generated/parser_test.dart (right):
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/test/generated...
> pkg/analyzer/test/generated/parser_test.dart:10482:
> expect(typeName.typeArguments, isNotNull);
> Should we check for "question"?
> 
>
https://codereview.chromium.org/2342383002/diff/1/pkg/analyzer/test/generated...
> pkg/analyzer/test/generated/parser_test.dart:10495:
> expect(typeName.typeArguments, isNull);
> Should we check for "question"?
> 
> Do we need a test for parsing TypeName in a more complex expression?

Some other tests that would be interesting:

class A extends B? {} // Error.
class A implements B? {} // Error.
class A extends Object with B? {} // Error.

class A<T?> {} // Error.

class A<T extends B?> {} // OK.
new Foo<T?>(); // OK.

Also, doing the same tests for "as" that you have for "is" might be good.

Powered by Google App Engine
This is Rietveld 408576698