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

Unified Diff: packages/petitparser/lib/lisp.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/petitparser/lib/json.dart ('k') | packages/petitparser/lib/petitparser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/petitparser/lib/lisp.dart
diff --git a/packages/petitparser/lib/lisp.dart b/packages/petitparser/lib/lisp.dart
deleted file mode 100644
index 6f239962b95f10c3b184f89877671d8b28c376be..0000000000000000000000000000000000000000
--- a/packages/petitparser/lib/lisp.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-/// This package contains a simple grammar and evaluator for LISP.
-///
-/// The code is reasonably complete to run and evaluate reasonably complex
-/// programs from the console and from the web browser.
-library petitparser.lisp;
-
-import 'dart:collection';
-import 'petitparser.dart';
-
-part 'src/lisp/cons.dart';
-part 'src/lisp/environment.dart';
-part 'src/lisp/grammar.dart';
-part 'src/lisp/name.dart';
-part 'src/lisp/natives.dart';
-part 'src/lisp/parser.dart';
-part 'src/lisp/standard.dart';
-
-/// The standard lisp parser definition.
-final lispParser = new LispParser();
-
-/// The evaluation function.
-eval(Environment env, expr) {
- if (expr is Cons) {
- return eval(env, expr.head)(env, expr.tail);
- } else if (expr is Name) {
- return env[expr];
- } else {
- return expr;
- }
-}
-
-/// Evaluate a cons of instructions.
-evalList(Environment env, expr) {
- var result = null;
- while (expr is Cons) {
- result = eval(env, expr.head);
- expr = expr.tail;
- }
- return result;
-}
-
-/// The arguments evaluation function.
-evalArguments(Environment env, args) {
- if (args is Cons) {
- return new Cons(eval(env, args.head), evalArguments(env, args.tail));
- } else {
- return null;
- }
-}
-
-/// Reads and evaluates a [script].
-evalString(Parser parser, Environment env, String script) {
- var result = null;
- for (var cell in parser.parse(script).value) {
- result = eval(env, cell);
- }
- return result;
-}
« no previous file with comments | « packages/petitparser/lib/json.dart ('k') | packages/petitparser/lib/petitparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698