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

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

Issue 760863002: Fix incremental parsing when class name is changed. (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
« 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 // 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 return _notAChild(node); 832 return _notAChild(node);
833 } 833 }
834 834
835 @override 835 @override
836 AstNode visitClassDeclaration(ClassDeclaration node) { 836 AstNode visitClassDeclaration(ClassDeclaration node) {
837 if (identical(_oldNode, node.documentationComment)) { 837 if (identical(_oldNode, node.documentationComment)) {
838 throw new InsufficientContextException(); 838 throw new InsufficientContextException();
839 } else if (node.metadata.contains(_oldNode)) { 839 } else if (node.metadata.contains(_oldNode)) {
840 return _parser.parseAnnotation(); 840 return _parser.parseAnnotation();
841 } else if (identical(_oldNode, node.name)) { 841 } else if (identical(_oldNode, node.name)) {
842 return _parser.parseSimpleIdentifier(); 842 // Changing the class name changes whether a member is interpreted as a
843 // constructor or not, so we'll just have to re-parse the entire class.
844 throw new InsufficientContextException();
843 } else if (identical(_oldNode, node.typeParameters)) { 845 } else if (identical(_oldNode, node.typeParameters)) {
844 return _parser.parseTypeParameterList(); 846 return _parser.parseTypeParameterList();
845 } else if (identical(_oldNode, node.extendsClause)) { 847 } else if (identical(_oldNode, node.extendsClause)) {
846 return _parser.parseExtendsClause(); 848 return _parser.parseExtendsClause();
847 } else if (identical(_oldNode, node.withClause)) { 849 } else if (identical(_oldNode, node.withClause)) {
848 return _parser.parseWithClause(); 850 return _parser.parseWithClause();
849 } else if (identical(_oldNode, node.implementsClause)) { 851 } else if (identical(_oldNode, node.implementsClause)) {
850 return _parser.parseImplementsClause(); 852 return _parser.parseImplementsClause();
851 } else if (node.members.contains(_oldNode)) { 853 } else if (node.members.contains(_oldNode)) {
852 ClassMember member = _parser.parseClassMember(node.name.name); 854 ClassMember member = _parser.parseClassMember(node.name.name);
(...skipping 11165 matching lines...) Expand 10 before | Expand all | Expand 10 after
12018 * Copy resolution data from one node to another. 12020 * Copy resolution data from one node to another.
12019 * 12021 *
12020 * @param fromNode the node from which resolution information will be copied 12022 * @param fromNode the node from which resolution information will be copied
12021 * @param toNode the node to which resolution information will be copied 12023 * @param toNode the node to which resolution information will be copied
12022 */ 12024 */
12023 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 12025 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
12024 ResolutionCopier copier = new ResolutionCopier(); 12026 ResolutionCopier copier = new ResolutionCopier();
12025 copier._isEqualNodes(fromNode, toNode); 12027 copier._isEqualNodes(fromNode, toNode);
12026 } 12028 }
12027 } 12029 }
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