OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library fasta.parser; | 5 library fasta.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 'parser/listener.dart' show Listener; | 9 import 'parser/listener.dart' show Listener; |
10 | 10 |
11 import 'parser/parser.dart' show Parser; | 11 import 'parser/parser.dart' show Parser; |
12 | 12 |
13 import 'parser/listener.dart' show ParserError; | 13 import 'parser/listener.dart' show ParserError; |
14 | 14 |
15 export 'parser/parser.dart' show Parser, optional; | 15 export 'parser/parser.dart' show Parser, optional; |
16 | 16 |
17 export 'parser/listener.dart' show Listener, ParserError; | 17 export 'parser/listener.dart' show Listener, ParserError; |
18 | 18 |
19 export 'parser/error_kind.dart' show ErrorKind; | 19 export 'parser/error_kind.dart' show ErrorKind; |
20 | 20 |
21 export 'parser/top_level_parser.dart' show TopLevelParser; | 21 export 'parser/top_level_parser.dart' show TopLevelParser; |
22 | 22 |
23 export 'parser/class_member_parser.dart' show ClassMemberParser; | 23 export 'parser/class_member_parser.dart' show ClassMemberParser; |
24 | 24 |
25 List<ParserError> parse(Token tokens) { | 25 List<ParserError> parse(Token tokens) { |
26 Listener listener = new Listener(); | 26 Listener listener = new Listener(); |
27 Parser parser = new Parser(listener); | 27 Parser parser = new Parser(listener); |
28 parser.parseUnit(tokens); | 28 parser.parseUnit(tokens); |
29 return listener.recoverableErrors; | 29 return listener.recoverableErrors; |
30 } | 30 } |
OLD | NEW |