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

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

Issue 725473005: During resolution, record the target of break/continue statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
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 10733 matching lines...) Expand 10 before | Expand all | Expand 10 after
10744 toNode.propagatedType = node.propagatedType; 10744 toNode.propagatedType = node.propagatedType;
10745 toNode.staticType = node.staticType; 10745 toNode.staticType = node.staticType;
10746 return true; 10746 return true;
10747 } 10747 }
10748 return false; 10748 return false;
10749 } 10749 }
10750 10750
10751 @override 10751 @override
10752 bool visitBreakStatement(BreakStatement node) { 10752 bool visitBreakStatement(BreakStatement node) {
10753 BreakStatement toNode = this._toNode as BreakStatement; 10753 BreakStatement toNode = this._toNode as BreakStatement;
10754 return _and( 10754 if (_and(
10755 _isEqualTokens(node.keyword, toNode.keyword), 10755 _isEqualTokens(node.keyword, toNode.keyword),
10756 _isEqualNodes(node.label, toNode.label), 10756 _isEqualNodes(node.label, toNode.label),
10757 _isEqualTokens(node.semicolon, toNode.semicolon)); 10757 _isEqualTokens(node.semicolon, toNode.semicolon))) {
10758 // TODO(paulberry): map node.target to toNode.target.
10759 return true;
10760 }
10761 return false;
10758 } 10762 }
10759 10763
10760 @override 10764 @override
10761 bool visitCascadeExpression(CascadeExpression node) { 10765 bool visitCascadeExpression(CascadeExpression node) {
10762 CascadeExpression toNode = this._toNode as CascadeExpression; 10766 CascadeExpression toNode = this._toNode as CascadeExpression;
10763 if (_and( 10767 if (_and(
10764 _isEqualNodes(node.target, toNode.target), 10768 _isEqualNodes(node.target, toNode.target),
10765 _isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) { 10769 _isEqualNodeLists(node.cascadeSections, toNode.cascadeSections))) {
10766 toNode.propagatedType = node.propagatedType; 10770 toNode.propagatedType = node.propagatedType;
10767 toNode.staticType = node.staticType; 10771 toNode.staticType = node.staticType;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
10909 _isEqualNodes(node.name, toNode.name))) { 10913 _isEqualNodes(node.name, toNode.name))) {
10910 toNode.staticElement = node.staticElement; 10914 toNode.staticElement = node.staticElement;
10911 return true; 10915 return true;
10912 } 10916 }
10913 return false; 10917 return false;
10914 } 10918 }
10915 10919
10916 @override 10920 @override
10917 bool visitContinueStatement(ContinueStatement node) { 10921 bool visitContinueStatement(ContinueStatement node) {
10918 ContinueStatement toNode = this._toNode as ContinueStatement; 10922 ContinueStatement toNode = this._toNode as ContinueStatement;
10919 return _and( 10923 if (_and(
10920 _isEqualTokens(node.keyword, toNode.keyword), 10924 _isEqualTokens(node.keyword, toNode.keyword),
10921 _isEqualNodes(node.label, toNode.label), 10925 _isEqualNodes(node.label, toNode.label),
10922 _isEqualTokens(node.semicolon, toNode.semicolon)); 10926 _isEqualTokens(node.semicolon, toNode.semicolon))) {
10927 // TODO(paulberry): map node.target to toNode.target.
10928 return true;
10929 }
10930 return false;
10923 } 10931 }
10924 10932
10925 @override 10933 @override
10926 bool visitDeclaredIdentifier(DeclaredIdentifier node) { 10934 bool visitDeclaredIdentifier(DeclaredIdentifier node) {
10927 DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier; 10935 DeclaredIdentifier toNode = this._toNode as DeclaredIdentifier;
10928 return _and( 10936 return _and(
10929 _isEqualNodes(node.documentationComment, toNode.documentationComment), 10937 _isEqualNodes(node.documentationComment, toNode.documentationComment),
10930 _isEqualNodeLists(node.metadata, toNode.metadata), 10938 _isEqualNodeLists(node.metadata, toNode.metadata),
10931 _isEqualTokens(node.keyword, toNode.keyword), 10939 _isEqualTokens(node.keyword, toNode.keyword),
10932 _isEqualNodes(node.type, toNode.type), 10940 _isEqualNodes(node.type, toNode.type),
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
12010 * Copy resolution data from one node to another. 12018 * Copy resolution data from one node to another.
12011 * 12019 *
12012 * @param fromNode the node from which resolution information will be copied 12020 * @param fromNode the node from which resolution information will be copied
12013 * @param toNode the node to which resolution information will be copied 12021 * @param toNode the node to which resolution information will be copied
12014 */ 12022 */
12015 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 12023 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
12016 ResolutionCopier copier = new ResolutionCopier(); 12024 ResolutionCopier copier = new ResolutionCopier();
12017 copier._isEqualNodes(fromNode, toNode); 12025 copier._isEqualNodes(fromNode, toNode);
12018 } 12026 }
12019 } 12027 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698