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

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

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Address comments. 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.diet.task; 5 library dart2js.parser.diet.task;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/tasks.dart' show CompilerTask, Measurer; 8 import '../common/tasks.dart' show CompilerTask, Measurer;
9 import '../elements/elements.dart' show CompilationUnitElement; 9 import '../elements/elements.dart' show CompilationUnitElement;
10 import '../js_backend/backend.dart' show JavaScriptBackend; 10 import '../js_backend/backend.dart' show JavaScriptBackend;
11 import '../id_generator.dart'; 11 import '../id_generator.dart';
12 import 'package:front_end/src/fasta/scanner.dart' show Token; 12 import 'package:front_end/src/fasta/scanner.dart' show Token;
13 import 'element_listener.dart' show ElementListener, ScannerOptions; 13 import 'element_listener.dart' show ElementListener, ScannerOptions;
14 import 'package:front_end/src/fasta/parser.dart' 14 import 'package:front_end/src/fasta/parser.dart'
15 show Listener, ParserError, TopLevelParser; 15 show Listener, MemberKind, ParserError, TopLevelParser;
16 16
17 class PartialParser extends TopLevelParser { 17 class PartialParser extends TopLevelParser {
18 PartialParser(Listener listener) : super(listener); 18 PartialParser(Listener listener) : super(listener);
19 19
20 Token parseFormalParameters(Token token, {bool inFunctionType: false}) { 20 Token parseFormalParameters(Token token, MemberKind kind) {
21 return skipFormalParameters(token); 21 return skipFormalParameters(token, kind);
22 } 22 }
23 } 23 }
24 24
25 class DietParserTask extends CompilerTask { 25 class DietParserTask extends CompilerTask {
26 final IdGenerator _idGenerator; 26 final IdGenerator _idGenerator;
27 final JavaScriptBackend _backend; 27 final JavaScriptBackend _backend;
28 final DiagnosticReporter _reporter; 28 final DiagnosticReporter _reporter;
29 29
30 DietParserTask( 30 DietParserTask(
31 this._idGenerator, this._backend, this._reporter, Measurer measurer) 31 this._idGenerator, this._backend, this._reporter, Measurer measurer)
(...skipping 11 matching lines...) Expand all
43 try { 43 try {
44 parser.parseUnit(tokens); 44 parser.parseUnit(tokens);
45 } on ParserError catch (_) { 45 } on ParserError catch (_) {
46 // TODO(johnniwinther): assert that the error was reported once there is 46 // TODO(johnniwinther): assert that the error was reported once there is
47 // a [hasErrorBeenReported] field in [DiagnosticReporter] 47 // a [hasErrorBeenReported] field in [DiagnosticReporter]
48 // The error should have already been reported by the parser. 48 // The error should have already been reported by the parser.
49 } 49 }
50 }); 50 });
51 } 51 }
52 } 52 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698