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

Side by Side Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 1870733002: Fix the parser to handle generic type arguments in named constructor invocations (issue 26183) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.parser; 5 library analyzer.src.generated.parser;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import "dart:math" as math; 8 import "dart:math" as math;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 3379
3380 /** 3380 /**
3381 * Parse a prefixed identifier. Return the prefixed identifier that was 3381 * Parse a prefixed identifier. Return the prefixed identifier that was
3382 * parsed. 3382 * parsed.
3383 * 3383 *
3384 * prefixedIdentifier ::= 3384 * prefixedIdentifier ::=
3385 * identifier ('.' identifier)? 3385 * identifier ('.' identifier)?
3386 */ 3386 */
3387 Identifier parsePrefixedIdentifier() { 3387 Identifier parsePrefixedIdentifier() {
3388 SimpleIdentifier qualifier = parseSimpleIdentifier(); 3388 SimpleIdentifier qualifier = parseSimpleIdentifier();
3389 if (!_matches(TokenType.PERIOD)) { 3389 if (!_matches(TokenType.PERIOD) || _injectGenericCommentTypeList()) {
3390 return qualifier; 3390 return qualifier;
3391 } 3391 }
3392 Token period = getAndAdvance(); 3392 Token period = getAndAdvance();
3393 SimpleIdentifier qualified = parseSimpleIdentifier(); 3393 SimpleIdentifier qualified = parseSimpleIdentifier();
3394 return new PrefixedIdentifier(qualifier, period, qualified); 3394 return new PrefixedIdentifier(qualifier, period, qualified);
3395 } 3395 }
3396 3396
3397 /** 3397 /**
3398 * Parse a return type. Return the return type that was parsed. 3398 * Parse a return type. Return the return type that was parsed.
3399 * 3399 *
(...skipping 6559 matching lines...) Expand 10 before | Expand all | Expand 10 after
9959 */ 9959 */
9960 const ParserErrorCode(String name, String message, [String correction]) 9960 const ParserErrorCode(String name, String message, [String correction])
9961 : super(name, message, correction); 9961 : super(name, message, correction);
9962 9962
9963 @override 9963 @override
9964 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 9964 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
9965 9965
9966 @override 9966 @override
9967 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 9967 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
9968 } 9968 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698