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

Side by Side Diff: packages/petitparser/lib/src/smalltalk/grammar.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 smalltalk; 1 part of petitparser.smalltalk;
2 2
3 /** 3 /// Smalltalk grammar.
4 * Smalltalk grammar.
5 */
6 class SmalltalkGrammar extends GrammarParser { 4 class SmalltalkGrammar extends GrammarParser {
7 SmalltalkGrammar() : super(new SmalltalkGrammarDefinition()); 5 SmalltalkGrammar() : super(new SmalltalkGrammarDefinition());
8 } 6 }
9 7
10 /** 8 /// Smalltalk grammar definition.
11 * Smalltalk grammar definition.
12 */
13 class SmalltalkGrammarDefinition extends GrammarDefinition { 9 class SmalltalkGrammarDefinition extends GrammarDefinition {
14 10
15 // the original implementation used a handwritten parser to 11 // the original implementation used a handwritten parser to
16 // build special token objects 12 // build special token objects
17 token(input) { 13 token(input) {
18 if (input is String) { 14 if (input is String) {
19 input = input.length == 1 ? char(input) : string(input); 15 input = input.length == 1 ? char(input) : string(input);
20 } 16 }
21 return input.token().trim(ref(spacer)); 17 return input.token().trim(ref(spacer));
22 } 18 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 .seq(char(':').not()); 216 .seq(char(':').not());
221 unaryExpression() => ref(primary) 217 unaryExpression() => ref(primary)
222 .seq(ref(unaryMessage).star()); 218 .seq(ref(unaryMessage).star());
223 unaryMessage() => ref(unaryToken); 219 unaryMessage() => ref(unaryToken);
224 unaryMethod() => ref(identifierToken); 220 unaryMethod() => ref(identifierToken);
225 unaryPragma() => ref(identifierToken); 221 unaryPragma() => ref(identifierToken);
226 unaryToken() => ref(token, ref(unary)); 222 unaryToken() => ref(token, ref(unary));
227 variable() => ref(identifierToken); 223 variable() => ref(identifierToken);
228 224
229 } 225 }
OLDNEW
« no previous file with comments | « packages/petitparser/lib/src/reflection/transform.dart ('k') | packages/petitparser/lib/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698