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

Side by Side Diff: utils/peg/pegparser.dart

Issue 10915231: Changed interfaces to abstract classes in utils. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « utils/lib/file_system.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('Peg Parser'); 5 #library('Peg Parser');
6 6
7 /* 7 /*
8 * The following functions are combinators for building Rules. 8 * The following functions are combinators for building Rules.
9 * 9 *
10 * A rule is one of the following 10 * A rule is one of the following
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // Used for constructing an error message. 330 // Used for constructing an error message.
331 int inhibitExpectedTrackingDepth = 0; 331 int inhibitExpectedTrackingDepth = 0;
332 int max_pos = 0; 332 int max_pos = 0;
333 var max_rule; 333 var max_rule;
334 } 334 }
335 335
336 /** 336 /**
337 * An interface tag for rules. If this tag is on a rule, then the description() 337 * An interface tag for rules. If this tag is on a rule, then the description()
338 * of the rule is something sensible to put in a message. 338 * of the rule is something sensible to put in a message.
339 */ 339 */
340 interface _Expectable { 340 abstract class _Expectable {
341 String description(); 341 String description();
342 } 342 }
343 343
344 class _Rule { 344 class _Rule {
345 const _Rule(); 345 const _Rule();
346 // Returns null for a match failure or [pos, ast] for success. 346 // Returns null for a match failure or [pos, ast] for success.
347 match(_ParserState state, int pos) { 347 match(_ParserState state, int pos) {
348 if (! state.inWhitespaceMode) { 348 if (! state.inWhitespaceMode) {
349 pos = _skip_whitespace(state, pos); 349 pos = _skip_whitespace(state, pos);
350 } 350 }
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 add(s); 849 add(s);
850 add(t); 850 add(t);
851 add(u); 851 add(u);
852 add(v); 852 add(v);
853 add(w); 853 add(w);
854 add(x); 854 add(x);
855 add(y); 855 add(y);
856 add(z); 856 add(z);
857 return list; 857 return list;
858 } 858 }
OLDNEW
« no previous file with comments | « utils/lib/file_system.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698