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

Side by Side Diff: packages/petitparser/lib/src/lisp/standard.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 part of lisp; 1 part of petitparser.lisp;
2 2
3 /** 3 /// The standard library.
4 * The standard library.
5 */
6 class Standard { 4 class Standard {
7 5
8 /** Imports the standard library into the [environment]. */ 6 /// Imports the standard library into the [environment].
9 static Environment import(Environment environment) { 7 static Environment import(Environment environment) {
10 evalString(lispParser, environment, _standardLibrary); 8 evalString(lispParser, environment, _standardLibrary);
11 return environment; 9 return environment;
12 } 10 }
13 11
14 /** A simple standard library, should be moved to external file. */ 12 /// A simple standard library, should be moved to external file.
15 static String _standardLibrary = """ 13 static String _standardLibrary = """
16 ; null functions 14 ; null functions
17 (define null '()) 15 (define null '())
18 (define (null? x) (= '() x)) 16 (define (null? x) (= '() x))
19 17
20 ; booleans 18 ; booleans
21 (define true (and)) 19 (define true (and))
22 (define false (or)) 20 (define false (or))
23 21
24 ; list functions 22 ; list functions
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 57
60 (define (inject list value proc) 58 (define (inject list value proc)
61 (if (null? list) 59 (if (null? list)
62 value 60 value
63 (inject 61 (inject
64 (cdr list) 62 (cdr list)
65 (proc value (car list)) 63 (proc value (car list))
66 proc))) 64 proc)))
67 """; 65 """;
68 } 66 }
OLDNEW
« 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