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

Unified Diff: pkg/compiler/lib/src/dart2js.dart

Issue 2439573003: Experiment with new function-type syntax.
Patch Set: Change a few more typedefs. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 9ee75e9b6f606c78119c5e75fff3ed671ddc7fb8..3ec6836fd632079f2ee9a128baf0d55694199119 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -40,7 +40,7 @@ String BUILD_ID = null;
* string argument, or the arguments iterator for multiple arguments
* handlers.
*/
-typedef void HandleOption(data);
+typedef HandleOption = (dynamic data) -> void;
class OptionHandler {
final String pattern;
@@ -760,12 +760,12 @@ void main(List<String> arguments) {
internalMain(arguments);
}
-typedef void ExitFunc(int exitCode);
-typedef Future<api.CompilationResult> CompileFunc(
+typedef ExitFunc = (int exitCode) -> void;
+typedef CompileFunc = (
CompilerOptions compilerOptions,
api.CompilerInput compilerInput,
api.CompilerDiagnostics compilerDiagnostics,
- api.CompilerOutput compilerOutput);
+ api.CompilerOutput compilerOutput) -> Future<api.CompilationResult>;
ExitFunc exitFunc = exit;
CompileFunc compileFunc = api.compile;

Powered by Google App Engine
This is Rietveld 408576698