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

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

Issue 2710973002: Revert "Add support for the new function-type syntax." (Closed)
Patch Set: Created 3 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) 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, 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) => skipFormalParameters(token);
21 return skipFormalParameters(token);
22 }
23 } 21 }
24 22
25 class DietParserTask extends CompilerTask { 23 class DietParserTask extends CompilerTask {
26 final IdGenerator _idGenerator; 24 final IdGenerator _idGenerator;
27 final JavaScriptBackend _backend; 25 final JavaScriptBackend _backend;
28 final DiagnosticReporter _reporter; 26 final DiagnosticReporter _reporter;
29 27
30 DietParserTask( 28 DietParserTask(
31 this._idGenerator, this._backend, this._reporter, Measurer measurer) 29 this._idGenerator, this._backend, this._reporter, Measurer measurer)
32 : super(measurer); 30 : super(measurer);
(...skipping 10 matching lines...) Expand all
43 try { 41 try {
44 parser.parseUnit(tokens); 42 parser.parseUnit(tokens);
45 } on ParserError catch (_) { 43 } on ParserError catch (_) {
46 // TODO(johnniwinther): assert that the error was reported once there is 44 // TODO(johnniwinther): assert that the error was reported once there is
47 // a [hasErrorBeenReported] field in [DiagnosticReporter] 45 // a [hasErrorBeenReported] field in [DiagnosticReporter]
48 // The error should have already been reported by the parser. 46 // The error should have already been reported by the parser.
49 } 47 }
50 }); 48 });
51 } 49 }
52 } 50 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.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