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

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/class_member_parser.dart

Issue 2890523002: merge fasta.Token into analyzer.Token (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
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.class_member_parser; 5 library fasta.parser.class_member_parser;
6 6
7 import '../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 'parser.dart' show Parser; 11 import 'parser.dart' show Parser;
12 12
13 /// Parser similar to [TopLevelParser] but also parses class members (excluding 13 /// Parser similar to [TopLevelParser] but also parses class members (excluding
14 /// their bodies). 14 /// their bodies).
15 class ClassMemberParser extends Parser { 15 class ClassMemberParser extends Parser {
16 ClassMemberParser(Listener listener) : super(listener); 16 ClassMemberParser(Listener listener) : super(listener);
17 17
18 Token parseExpression(Token token) => skipExpression(token); 18 Token parseExpression(Token token) => skipExpression(token);
19 19
20 Token parseRecoverExpression(Token token) { 20 Token parseRecoverExpression(Token token) {
21 Token begin = token; 21 Token begin = token;
22 token = skipExpression(token); 22 token = skipExpression(token);
23 listener.handleRecoverExpression(begin); 23 listener.handleRecoverExpression(begin);
24 return token; 24 return token;
25 } 25 }
26 26
27 // This method is overridden for two reasons: 27 // This method is overridden for two reasons:
28 // 1. Avoid generating events for arguments. 28 // 1. Avoid generating events for arguments.
29 // 2. Avoid calling skip expression for each argument (which doesn't work). 29 // 2. Avoid calling skip expression for each argument (which doesn't work).
30 Token parseArgumentsOpt(Token token) => skipArgumentsOpt(token); 30 Token parseArgumentsOpt(Token token) => skipArgumentsOpt(token);
31 31
32 Token parseFunctionBody(Token token, bool isExpression, bool allowAbstract) { 32 Token parseFunctionBody(Token token, bool isExpression, bool allowAbstract) {
33 return skipFunctionBody(token, isExpression, allowAbstract); 33 return skipFunctionBody(token, isExpression, allowAbstract);
34 } 34 }
35 } 35 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser.dart ('k') | pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698