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

Unified Diff: packages/petitparser/lib/src/lisp/standard.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
Index: packages/petitparser/lib/src/lisp/standard.dart
diff --git a/packages/petitparser/lib/src/lisp/standard.dart b/packages/petitparser/lib/src/lisp/standard.dart
deleted file mode 100644
index 8044d6278f6c8f85a1ea1fca13ab8c9af2158e02..0000000000000000000000000000000000000000
--- a/packages/petitparser/lib/src/lisp/standard.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-part of petitparser.lisp;
-
-/// The standard library.
-class Standard {
-
- /// Imports the standard library into the [environment].
- static Environment import(Environment environment) {
- evalString(lispParser, environment, _standardLibrary);
- return environment;
- }
-
- /// A simple standard library, should be moved to external file.
- static String _standardLibrary = """
-; null functions
-(define null '())
-(define (null? x) (= '() x))
-
-; booleans
-(define true (and))
-(define false (or))
-
-; list functions
-(define (length list)
- (if (null? list)
- 0
- (+ 1 (length (cdr list)))))
-
-(define (append list1 list2)
- (if (null? list1)
- list2
- (cons (car list1) (append (cdr list1) list2))))
-
-(define (list-head list index)
- (if (= index 0)
- (car list)
- (list-head
- (cdr list)
- (- index 1))))
-
-(define (list-tail list index)
- (if (= index 0)
- (cdr list)
- (list-tail
- (cdr list)
- (- index 1))))
-
-(define (for-each list proc)
- (while (not (null? list))
- (proc (car list))
- (set! list (cdr list))))
-
-(define (map list proc)
- (if (null? list)
- '()
- (cons (proc (car list))
- (map (cdr list) proc))))
-
-(define (inject list value proc)
- (if (null? list)
- value
- (inject
- (cdr list)
- (proc value (car list))
- proc)))
-""";
-}
« no previous file with comments | « packages/petitparser/lib/src/lisp/parser.dart ('k') | packages/petitparser/lib/src/petitparser/actions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698