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

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

Issue 739723003: Incremental parser fix: handle insertion of "final" before field decl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bogus test Created 6 years, 1 month 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 } 1702 }
1703 return _notAChild(node); 1703 return _notAChild(node);
1704 } 1704 }
1705 1705
1706 @override 1706 @override
1707 AstNode visitVariableDeclarationList(VariableDeclarationList node) { 1707 AstNode visitVariableDeclarationList(VariableDeclarationList node) {
1708 if (identical(_oldNode, node.documentationComment)) { 1708 if (identical(_oldNode, node.documentationComment)) {
1709 throw new InsufficientContextException(); 1709 throw new InsufficientContextException();
1710 } else if (node.metadata.contains(_oldNode)) { 1710 } else if (node.metadata.contains(_oldNode)) {
1711 return _parser.parseAnnotation(); 1711 return _parser.parseAnnotation();
1712 } else if (identical(_oldNode, node.type)) {
1713 // There is not enough context to know whether we should reparse the type
1714 // using parseReturnType() (which allows 'void') or parseTypeName()
1715 // (which doesn't). Note that even though the language disallows
1716 // variables of type 'void', the parser sometimes accepts them in the
1717 // course of error recovery (e.g. "class C { void v; }"
1718 throw new InsufficientContextException();
1712 } else if (node.variables.contains(_oldNode)) { 1719 } else if (node.variables.contains(_oldNode)) {
1713 throw new InsufficientContextException(); 1720 throw new InsufficientContextException();
1714 } 1721 }
1715 return _notAChild(node); 1722 return _notAChild(node);
1716 } 1723 }
1717 1724
1718 @override 1725 @override
1719 AstNode visitVariableDeclarationStatement(VariableDeclarationStatement node) { 1726 AstNode visitVariableDeclarationStatement(VariableDeclarationStatement node) {
1720 if (identical(_oldNode, node.variables)) { 1727 if (identical(_oldNode, node.variables)) {
1721 throw new InsufficientContextException(); 1728 throw new InsufficientContextException();
(...skipping 10276 matching lines...) Expand 10 before | Expand all | Expand 10 after
11998 * Copy resolution data from one node to another. 12005 * Copy resolution data from one node to another.
11999 * 12006 *
12000 * @param fromNode the node from which resolution information will be copied 12007 * @param fromNode the node from which resolution information will be copied
12001 * @param toNode the node to which resolution information will be copied 12008 * @param toNode the node to which resolution information will be copied
12002 */ 12009 */
12003 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 12010 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
12004 ResolutionCopier copier = new ResolutionCopier(); 12011 ResolutionCopier copier = new ResolutionCopier();
12005 copier._isEqualNodes(fromNode, toNode); 12012 copier._isEqualNodes(fromNode, toNode);
12006 } 12013 }
12007 } 12014 }
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