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

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

Issue 1145733002: Stop reporting error when not parsing function bodies (issue 23460) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
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
« no previous file with comments | « no previous file | 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 5048 matching lines...) Expand 10 before | Expand all | Expand 10 after
5059 redirectedConstructor); 5059 redirectedConstructor);
5060 } 5060 }
5061 } else { 5061 } else {
5062 body = _parseFunctionBody( 5062 body = _parseFunctionBody(
5063 true, ParserErrorCode.MISSING_FUNCTION_BODY, false); 5063 true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
5064 if (constKeyword != null && 5064 if (constKeyword != null &&
5065 factoryKeyword != null && 5065 factoryKeyword != null &&
5066 externalKeyword == null) { 5066 externalKeyword == null) {
5067 _reportErrorForToken(ParserErrorCode.CONST_FACTORY, factoryKeyword); 5067 _reportErrorForToken(ParserErrorCode.CONST_FACTORY, factoryKeyword);
5068 } else if (body is EmptyFunctionBody) { 5068 } else if (body is EmptyFunctionBody) {
5069 if (factoryKeyword != null && externalKeyword == null) { 5069 if (factoryKeyword != null &&
5070 externalKeyword == null &&
5071 _parseFunctionBodies) {
5070 _reportErrorForToken( 5072 _reportErrorForToken(
5071 ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword); 5073 ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword);
5072 } 5074 }
5073 } else { 5075 } else {
5074 if (constKeyword != null) { 5076 if (constKeyword != null) {
5075 _reportErrorForNode( 5077 _reportErrorForNode(
5076 ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body); 5078 ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body);
5077 } else if (!bodyAllowed) { 5079 } else if (!bodyAllowed) {
5078 _reportErrorForNode( 5080 _reportErrorForNode(
5079 ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body); 5081 ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body);
(...skipping 5505 matching lines...) Expand 10 before | Expand all | Expand 10 after
10585 } 10587 }
10586 10588
10587 /** 10589 /**
10588 * Copy resolution data from the [fromNode] to the [toNode]. 10590 * Copy resolution data from the [fromNode] to the [toNode].
10589 */ 10591 */
10590 static void copyResolutionData(AstNode fromNode, AstNode toNode) { 10592 static void copyResolutionData(AstNode fromNode, AstNode toNode) {
10591 ResolutionCopier copier = new ResolutionCopier(); 10593 ResolutionCopier copier = new ResolutionCopier();
10592 copier._isEqualNodes(fromNode, toNode); 10594 copier._isEqualNodes(fromNode, toNode);
10593 } 10595 }
10594 } 10596 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698