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

Side by Side Diff: pkg/compiler/lib/src/parser/partial_parser.dart

Issue 1723443003: First step of support for parsing and ignoring generic methods. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 dart2js.parser.partial; 5 library dart2js.parser.partial;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../util/characters.dart' as Characters show 8 import '../util/characters.dart' as Characters show
9 $CLOSE_CURLY_BRACKET; 9 $CLOSE_CURLY_BRACKET;
10 import '../tokens/token.dart' show 10 import '../tokens/token.dart' show
11 BeginGroupToken, 11 BeginGroupToken,
12 ErrorToken, 12 ErrorToken,
13 Token; 13 Token;
14 import '../tokens/token_constants.dart' as Tokens show 14 import '../tokens/token_constants.dart' as Tokens show
15 EOF_TOKEN; 15 EOF_TOKEN;
16 16
17 import 'listener.dart' show 17 import 'listener.dart' show
18 Listener; 18 Listener;
19 import 'parser.dart' show 19 import 'parser.dart' show
20 Parser; 20 Parser;
21 21
22 class PartialParser extends Parser { 22 class PartialParser extends Parser {
23 PartialParser(Listener listener, {bool enableConditionalDirectives}) 23 PartialParser(Listener listener,
24 : super(listener, 24 {bool enableConditionalDirectives: false,
25 enableConditionalDirectives: enableConditionalDirectives); 25 bool asyncAwaitKeywordsEnabled: false,
26 bool enableGenericMethods: false})
27 : super(
28 listener,
29 enableConditionalDirectives: enableConditionalDirectives,
30 asyncAwaitKeywordsEnabled: asyncAwaitKeywordsEnabled,
31 enableGenericMethods: enableGenericMethods);
26 32
27 Token parseClassBody(Token token) => skipClassBody(token); 33 Token parseClassBody(Token token) => skipClassBody(token);
28 34
29 Token fullParseClassBody(Token token) => super.parseClassBody(token); 35 Token fullParseClassBody(Token token) => super.parseClassBody(token);
30 36
31 Token parseExpression(Token token) => skipExpression(token); 37 Token parseExpression(Token token) => skipExpression(token);
32 38
33 Token parseArgumentsOpt(Token token) { 39 Token parseArgumentsOpt(Token token) {
34 // This method is overridden for two reasons: 40 // This method is overridden for two reasons:
35 // 1. Avoid generating events for arguments. 41 // 1. Avoid generating events for arguments.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return token; 180 return token;
175 } 181 }
176 return listener.unexpected(token); 182 return listener.unexpected(token);
177 } 183 }
178 BeginGroupToken beginGroupToken = token; 184 BeginGroupToken beginGroupToken = token;
179 Token endToken = beginGroupToken.endGroup; 185 Token endToken = beginGroupToken.endGroup;
180 listener.endFormalParameters(0, token, endToken); 186 listener.endFormalParameters(0, token, endToken);
181 return endToken.next; 187 return endToken.next;
182 } 188 }
183 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698