Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env dart | |
| 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
|
Kevin Millikin (Google)
2017/03/02 10:30:29
2017
| |
| 3 // for details. All rights reserved. Use of this source code is governed by a | |
| 4 // BSD-style license that can be found in the LICENSE file. | |
| 5 | |
| 6 import 'package:kernel/kernel.dart'; | |
| 7 import 'package:kernel/interpreter/interpreter.dart'; | |
| 8 import 'dart:io'; | |
| 9 | |
| 10 fail(String message) { | |
| 11 stderr.writeln(message); | |
| 12 exit(1); | |
| 13 } | |
| 14 | |
| 15 main(List<String> args) { | |
| 16 if (args.length == 1 && args[0].endsWith('.dill')) { | |
| 17 var program = loadProgramFromBinary(args[0]); | |
| 18 new Interpreter(program).evalProgram(); | |
| 19 } else { | |
| 20 return fail('One input binary file shoud be specified.'); | |
|
Kevin Millikin (Google)
2017/03/02 10:30:29
shoud ==> should
| |
| 21 } | |
| 22 } | |
| OLD | NEW |