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

Side by Side Diff: pkg/kernel/bin/eval.dart

Issue 2740433006: Implement support for variables and evaluation of logic expressions (Closed)
Patch Set: Apply some suggestions from CR Created 3 years, 9 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
« no previous file with comments | « no previous file | pkg/kernel/lib/interpreter/interpreter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 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. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'package:kernel/kernel.dart'; 6 import 'package:kernel/kernel.dart';
7 import 'package:kernel/interpreter/interpreter.dart'; 7 import 'package:kernel/interpreter/interpreter.dart';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 fail(String message) { 10 fail(String message) {
11 stderr.writeln(message); 11 stderr.writeln(message);
12 exit(1); 12 exit(1);
13 } 13 }
14 14
15 main(List<String> args) { 15 main(List<String> args) {
16 if (args.length == 1 && args[0].endsWith('.dill')) { 16 if (args.length == 1 && args[0].endsWith('.dill')) {
17 var program = loadProgramFromBinary(args[0]); 17 var program = loadProgramFromBinary(args[0]);
18 new Interpreter(program).evalProgram(); 18 new Interpreter(program).run();
19 } else { 19 } else {
20 return fail('One input binary file should be specified.'); 20 return fail('One input binary file should be specified.');
21 } 21 }
22 } 22 }
OLDNEW
« no previous file with comments | « no previous file | pkg/kernel/lib/interpreter/interpreter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698