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

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

Issue 1615963003: Issue 25522. Insert a synthetic '>' for incomplete type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
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 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 _currentToken.previous, [type.lexeme]); 3794 _currentToken.previous, [type.lexeme]);
3795 } else { 3795 } else {
3796 _reportErrorForCurrentToken( 3796 _reportErrorForCurrentToken(
3797 ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]); 3797 ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
3798 } 3798 }
3799 return _currentToken; 3799 return _currentToken;
3800 } 3800 }
3801 3801
3802 /** 3802 /**
3803 * If the current token has the type [TokenType.GT], return it after advancing 3803 * If the current token has the type [TokenType.GT], return it after advancing
3804 * to the next token. Otherwise report an error and return the current token 3804 * to the next token. Otherwise report an error and return the current token
Brian Wilkerson 2016/01/21 19:25:12 The comment needs to be updated.
scheglov 2016/01/21 21:03:46 Done.
3805 * without advancing. 3805 * without advancing.
3806 */ 3806 */
3807 Token _expectGt() { 3807 Token _expectGt() {
3808 if (_matchesGt()) { 3808 if (_matchesGt()) {
3809 return getAndAdvance(); 3809 return getAndAdvance();
3810 } 3810 }
3811 _reportErrorForCurrentToken( 3811 _reportErrorForCurrentToken(
3812 ParserErrorCode.EXPECTED_TOKEN, [TokenType.GT.lexeme]); 3812 ParserErrorCode.EXPECTED_TOKEN, [TokenType.GT.lexeme]);
3813 return _currentToken; 3813 return _createSyntheticToken(TokenType.GT);
3814 } 3814 }
3815 3815
3816 /** 3816 /**
3817 * If the current token is a keyword matching the given [keyword], return it 3817 * If the current token is a keyword matching the given [keyword], return it
3818 * after advancing to the next token. Otherwise report an error and return the 3818 * after advancing to the next token. Otherwise report an error and return the
3819 * current token without advancing. 3819 * current token without advancing.
3820 */ 3820 */
3821 Token _expectKeyword(Keyword keyword) { 3821 Token _expectKeyword(Keyword keyword) {
3822 if (_matchesKeyword(keyword)) { 3822 if (_matchesKeyword(keyword)) {
3823 return getAndAdvance(); 3823 return getAndAdvance();
(...skipping 7536 matching lines...) Expand 10 before | Expand all | Expand 10 after
11360 } 11360 }
11361 11361
11362 /** 11362 /**
11363 * Copy resolution data from the [fromNode] to the [toNode]. 11363 * Copy resolution data from the [fromNode] to the [toNode].
11364 */ 11364 */
11365 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 11365 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
11366 ResolutionCopier copier = new ResolutionCopier(); 11366 ResolutionCopier copier = new ResolutionCopier();
11367 copier._isEqualNodes(fromNode, toNode); 11367 copier._isEqualNodes(fromNode, toNode);
11368 } 11368 }
11369 } 11369 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | pkg/analyzer/test/generated/parser_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698