OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 library fasta.parser.top_level_parser; | 5 library fasta.parser.top_level_parser; |
6 | 6 |
7 import 'package:front_end/src/fasta/scanner/token.dart' show Token; | 7 import '../scanner/token.dart' show Token; |
8 | 8 |
9 import 'listener.dart' show Listener; | 9 import 'listener.dart' show Listener; |
10 | 10 |
11 import 'class_member_parser.dart' show ClassMemberParser; | 11 import 'class_member_parser.dart' show ClassMemberParser; |
12 | 12 |
13 /// Parser which only parses top-level elements, but ignores their bodies. | 13 /// Parser which only parses top-level elements, but ignores their bodies. |
14 /// Use [Parser] to parse everything. | 14 /// Use [Parser] to parse everything. |
15 class TopLevelParser extends ClassMemberParser { | 15 class TopLevelParser extends ClassMemberParser { |
16 TopLevelParser(Listener listener, {bool asyncAwaitKeywordsEnabled: false}) | 16 TopLevelParser(Listener listener, {bool asyncAwaitKeywordsEnabled: false}) |
17 : super(listener, asyncAwaitKeywordsEnabled: asyncAwaitKeywordsEnabled); | 17 : super(listener, asyncAwaitKeywordsEnabled: asyncAwaitKeywordsEnabled); |
18 | 18 |
19 Token parseClassBody(Token token) => skipClassBody(token); | 19 Token parseClassBody(Token token) => skipClassBody(token); |
20 } | 20 } |
OLD | NEW |