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

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

Issue 1117183002: Ignore synthetic tokens when search for AstNode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | no next file » | 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.parser; 8 library engine.parser;
9 9
10 import "dart:math" as math; 10 import "dart:math" as math;
(...skipping 6563 matching lines...) Expand 10 before | Expand all | Expand 10 after
6574 return _parseEmptyStatement(); 6574 return _parseEmptyStatement();
6575 } else if (_isInitializedVariableDeclaration()) { 6575 } else if (_isInitializedVariableDeclaration()) {
6576 return _parseVariableDeclarationStatementAfterMetadata( 6576 return _parseVariableDeclarationStatementAfterMetadata(
6577 commentAndMetadata); 6577 commentAndMetadata);
6578 } else if (_isFunctionDeclaration()) { 6578 } else if (_isFunctionDeclaration()) {
6579 return _parseFunctionDeclarationStatement(); 6579 return _parseFunctionDeclarationStatement();
6580 } else if (_matches(TokenType.CLOSE_CURLY_BRACKET)) { 6580 } else if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
6581 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT); 6581 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT);
6582 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON)); 6582 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON));
6583 } else { 6583 } else {
6584 return new ExpressionStatement( 6584 return new ExpressionStatement(parseExpression2(), _expectSemicolon());
6585 parseExpression2(), _expect(TokenType.SEMICOLON));
6586 } 6585 }
6587 } 6586 }
6588 6587
6589 /** 6588 /**
6590 * Parse an operator declaration. The [commentAndMetadata] is the 6589 * Parse an operator declaration. The [commentAndMetadata] is the
6591 * documentation comment and metadata to be associated with the declaration. 6590 * documentation comment and metadata to be associated with the declaration.
6592 * The [externalKeyword] is the 'external' token. The [returnType] is the 6591 * The [externalKeyword] is the 'external' token. The [returnType] is the
6593 * return type that has already been parsed, or `null` if there was no return 6592 * return type that has already been parsed, or `null` if there was no return
6594 * type. Return the operator declaration that was parsed. 6593 * type. Return the operator declaration that was parsed.
6595 * 6594 *
(...skipping 3991 matching lines...) Expand 10 before | Expand all | Expand 10 after
10587 } 10586 }
10588 10587
10589 /** 10588 /**
10590 * Copy resolution data from the [fromNode] to the [toNode]. 10589 * Copy resolution data from the [fromNode] to the [toNode].
10591 */ 10590 */
10592 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 10591 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
10593 ResolutionCopier copier = new ResolutionCopier(); 10592 ResolutionCopier copier = new ResolutionCopier();
10594 copier._isEqualNodes(fromNode, toNode); 10593 copier._isEqualNodes(fromNode, toNode);
10595 } 10594 }
10596 } 10595 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698