Index: pkg/dart_parser/lib/src/top_level_parser.dart |
diff --git a/pkg/dart_parser/lib/src/top_level_parser.dart b/pkg/dart_parser/lib/src/top_level_parser.dart |
index 4c1fbdbb8a78c849e3470f9dd7e3cfa58ff152f9..8eae855c9df3b4880b183ee4c0b4838ae539cd0b 100644 |
--- a/pkg/dart_parser/lib/src/top_level_parser.dart |
+++ b/pkg/dart_parser/lib/src/top_level_parser.dart |
@@ -5,21 +5,14 @@ |
library dart_parser.top_level_parser; |
import 'package:dart_scanner/src/token.dart' show |
- BeginGroupToken, |
Token; |
-import 'package:dart_scanner/src/characters.dart' show |
- $CLOSE_CURLY_BRACKET; |
- |
import 'listener.dart' show |
Listener; |
import 'class_member_parser.dart' show |
ClassMemberParser; |
-import 'parser.dart' show |
- optional; |
- |
/// Parser which only parses top-level elements, but ignores their bodies. |
/// Use [Parser] to parse everything. |
class TopLevelParser extends ClassMemberParser { |
@@ -29,17 +22,5 @@ class TopLevelParser extends ClassMemberParser { |
: super(listener, asyncAwaitKeywordsEnabled: asyncAwaitKeywordsEnabled, |
enableGenericMethodSyntax: enableGenericMethodSyntax); |
- Token parseClassBody(Token token) { |
- if (!optional('{', token)) { |
- return listener.expectedClassBodyToSkip(token); |
- } |
- BeginGroupToken beginGroupToken = token; |
- Token endGroup = beginGroupToken.endGroup; |
- if (endGroup == null) { |
- return listener.unmatched(beginGroupToken); |
- } else if (!identical(endGroup.kind, $CLOSE_CURLY_BRACKET)) { |
- return listener.unmatched(beginGroupToken); |
- } |
- return endGroup; |
- } |
+ Token parseClassBody(Token token) => skipClassBody(token); |
} |