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 part of scanner; | 5 library dart2js.parser.partial; |
| 6 |
| 7 import '../diagnostics/messages.dart' show |
| 8 MessageKind; |
| 9 import '../util/characters.dart' show |
| 10 $CLOSE_CURLY_BRACKET; |
| 11 |
| 12 import 'listener.dart' show |
| 13 Listener; |
| 14 import 'parser.dart' show |
| 15 Parser; |
| 16 import 'token.dart' show |
| 17 BeginGroupToken, |
| 18 EOF_TOKEN, |
| 19 ErrorToken, |
| 20 Token; |
6 | 21 |
7 class PartialParser extends Parser { | 22 class PartialParser extends Parser { |
8 PartialParser(Listener listener) : super(listener); | 23 PartialParser(Listener listener) : super(listener); |
9 | 24 |
10 Token parseClassBody(Token token) => skipClassBody(token); | 25 Token parseClassBody(Token token) => skipClassBody(token); |
11 | 26 |
12 Token fullParseClassBody(Token token) => super.parseClassBody(token); | 27 Token fullParseClassBody(Token token) => super.parseClassBody(token); |
13 | 28 |
14 Token parseExpression(Token token) => skipExpression(token); | 29 Token parseExpression(Token token) => skipExpression(token); |
15 | 30 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return token; | 172 return token; |
158 } | 173 } |
159 return listener.unexpected(token); | 174 return listener.unexpected(token); |
160 } | 175 } |
161 BeginGroupToken beginGroupToken = token; | 176 BeginGroupToken beginGroupToken = token; |
162 Token endToken = beginGroupToken.endGroup; | 177 Token endToken = beginGroupToken.endGroup; |
163 listener.endFormalParameters(0, token, endToken); | 178 listener.endFormalParameters(0, token, endToken); |
164 return endToken.next; | 179 return endToken.next; |
165 } | 180 } |
166 } | 181 } |
OLD | NEW |