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

Side by Side Diff: petitparser/lib/src/lisp/parser.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
« no previous file with comments | « petitparser/lib/src/lisp/natives.dart ('k') | petitparser/lib/src/lisp/standard.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 part of lisp;
2
3 /**
4 * LISP parser.
5 */
6 class LispParser extends GrammarParser {
7 LispParser() : super(new LispParserDefinition());
8 }
9
10 /**
11 * LISP parser definition.
12 */
13 class LispParserDefinition extends LispGrammarDefinition {
14
15 list() => super.list().map((each) => each[1]);
16
17 cell() => super.cell().map((each) => new Cons(each[0], each[1]));
18 empty() => super.empty().map((each) => null);
19
20 string() => super.string().map((each) => new String.fromCharCodes(each[1]));
21 characterEscape() => super.characterEscape().map((each) => each[1].codeUnitAt( 0));
22 characterRaw() => super.characterRaw().map((each) => each.codeUnitAt(0));
23
24 symbol() => super.symbol().map((each) => new Name(each));
25 number() => super.number().map((each) {
26 var floating = double.parse(each);
27 var integral = floating.toInt();
28 if (floating == integral && each.indexOf('.') == -1) {
29 return integral;
30 } else {
31 return floating;
32 }
33 });
34
35 quote() => super.quote().map((each) => new Cons(Natives._quote, each[1]));
36
37 }
OLDNEW
« no previous file with comments | « petitparser/lib/src/lisp/natives.dart ('k') | petitparser/lib/src/lisp/standard.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698