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

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

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 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
(Empty)
1 part of petitparser.lisp;
2
3 /// LISP parser.
4 class LispParser extends GrammarParser {
5 LispParser() : super(new LispParserDefinition());
6 }
7
8 /// LISP parser definition.
9 class LispParserDefinition extends LispGrammarDefinition {
10
11 list() => super.list().map((each) => each[1]);
12
13 cell() => super.cell().map((each) => new Cons(each[0], each[1]));
14 empty() => super.empty().map((each) => null);
15
16 string() => super.string().map((each) => new String.fromCharCodes(each[1]));
17 characterEscape() => super.characterEscape().map((each) => each[1].codeUnitAt( 0));
18 characterRaw() => super.characterRaw().map((each) => each.codeUnitAt(0));
19
20 symbol() => super.symbol().map((each) => new Name(each));
21 number() => super.number().map((each) {
22 var floating = double.parse(each);
23 var integral = floating.toInt();
24 if (floating == integral && each.indexOf('.') == -1) {
25 return integral;
26 } else {
27 return floating;
28 }
29 });
30
31 quote() => super.quote().map((each) => new Cons(Natives._quote, each[1]));
32
33 }
OLDNEW
« no previous file with comments | « packages/petitparser/lib/src/lisp/natives.dart ('k') | packages/petitparser/lib/src/lisp/standard.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698