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

Unified Diff: dart/frog/samples/ifrog.dart

Issue 10164004: Remove frogsh. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 8 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
« no previous file with comments | « dart/frog/presubmit.py ('k') | dart/frog/scripts/bootstrap/frogsh.bat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/samples/ifrog.dart
diff --git a/dart/frog/samples/ifrog.dart b/dart/frog/samples/ifrog.dart
deleted file mode 100644
index c5576138b39dbce9dea531f0ca012e42721486cd..0000000000000000000000000000000000000000
--- a/dart/frog/samples/ifrog.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
-#import('../lib/node/node.dart');
-#import('../file_system_node.dart');
-#import('../js_evaluator_node.dart');
-#import('../lang.dart');
-#import('../evaluator.dart');
-
-String _getPrompt(Token incompleteToken) {
- if (incompleteToken == null) return ">>> ";
- switch (incompleteToken.kind) {
- case TokenKind.INCOMPLETE_MULTILINE_STRING_DQ: return '""" ';
- case TokenKind.INCOMPLETE_MULTILINE_STRING_SQ: return "''' ";
- default: return "... ";
- }
-}
-
-void main() {
- var homedir = path.dirname(fs.realpathSync(process.argv[1]));
- Evaluator.initWorld(homedir, [], new NodeFileSystem());
-
- var eval = new Evaluator(new NodeJsEvaluator());
- var rl = Readline.createInterface(process.stdin, process.stdout);
- var incompleteToken = null;
- var priorCommand = null;
-
- rl.setPrompt(">>> ");
- rl.on("line", (command) {
- if (priorCommand != null) command = priorCommand + "\n" + command;
- try {
- var result = eval.eval(command);
- if (result !== null) print(result);
- incompleteToken = null;
- priorCommand = null;
- } catch (CompilerException e) {
- // Do nothing, since a message was already printed
- incompleteToken = null;
- priorCommand = null;
- } catch (IncompleteSourceException e) {
- incompleteToken = e.token;
- priorCommand = command;
- } catch (var e, stack) {
- incompleteToken = null;
- priorCommand = null;
- if (stack != null) {
- print(stack);
- } else {
- print(e);
- }
- }
-
- rl.setPrompt(_getPrompt(incompleteToken));
- rl.prompt();
- });
- rl.on("close", () { process.exit(0); });
- rl.prompt();
-}
« no previous file with comments | « dart/frog/presubmit.py ('k') | dart/frog/scripts/bootstrap/frogsh.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698