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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 2e5bca214d79e8ecb542d8ad8eb44e24ea7f385f..29974682eaaa61b81bd3fb6ff3e4a24a9d367556 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -5066,7 +5066,9 @@ class Parser {
externalKeyword == null) {
_reportErrorForToken(ParserErrorCode.CONST_FACTORY, factoryKeyword);
} else if (body is EmptyFunctionBody) {
- if (factoryKeyword != null && externalKeyword == null) {
+ if (factoryKeyword != null &&
+ externalKeyword == null &&
+ _parseFunctionBodies) {
_reportErrorForToken(
ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword);
}
« 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