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

Unified Diff: packages/petitparser/lib/src/petitparser/parsers.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 side-by-side diff with in-line comments
Download patch
Index: packages/petitparser/lib/src/petitparser/parsers.dart
diff --git a/petitparser/lib/src/core/parsers.dart b/packages/petitparser/lib/src/petitparser/parsers.dart
similarity index 61%
rename from petitparser/lib/src/core/parsers.dart
rename to packages/petitparser/lib/src/petitparser/parsers.dart
index 57c4bbc6288c4256598d55e51a811f0d2984eb5a..8cc02d13be2342a6962affeac5dbf5e8eaba0e13 100644
--- a/petitparser/lib/src/core/parsers.dart
+++ b/packages/petitparser/lib/src/petitparser/parsers.dart
@@ -1,16 +1,12 @@
part of petitparser;
-/**
- * Returns a parser that consumes nothing and succeeds.
- *
- * For example, `char('a').or(epsilon())` is equivalent to
- * `char('a').optional()`.
- */
+/// Returns a parser that consumes nothing and succeeds.
+///
+/// For example, `char('a').or(epsilon())` is equivalent to
+/// `char('a').optional()`.
Parser epsilon([result]) => new EpsilonParser(result);
-/**
- * A parser that consumes nothing and succeeds.
- */
+/// A parser that consumes nothing and succeeds.
class EpsilonParser extends Parser {
final _result;
@@ -30,18 +26,14 @@ class EpsilonParser extends Parser {
}
}
-/**
- * Returns a parser that consumes nothing and fails.
- *
- * For example, `failure()` always fails, no matter what input it is given.
- */
+/// Returns a parser that consumes nothing and fails.
+///
+/// For example, `failure()` always fails, no matter what input it is given.
Parser failure([String message = 'unable to parse']) {
return new FailureParser(message);
}
-/**
- * A parser that consumes nothing and fails.
- */
+/// A parser that consumes nothing and fails.
class FailureParser extends Parser {
final String _message;
@@ -64,30 +56,24 @@ class FailureParser extends Parser {
}
}
-/**
- * Returns a parser that is not defined, but that can be set at a later
- * point in time.
- *
- * For example, the following code sets up a parser that points to itself
- * and that accepts a sequence of a's ended with the letter b.
- *
- * var p = undefined();
- * p.set(char('a').seq(p).or(char('b')));
- */
+/// Returns a parser that is not defined, but that can be set at a later
+/// point in time.
+///
+/// For example, the following code sets up a parser that points to itself
+/// and that accepts a sequence of a's ended with the letter b.
+///
+/// var p = undefined();
+/// p.set(char('a').seq(p).or(char('b')));
SettableParser undefined([String message = 'undefined parser']) {
return failure(message).settable();
}
-/**
- * A parser that is not defined, but that can be set at a later
- * point in time.
- */
+/// A parser that is not defined, but that can be set at a later
+/// point in time.
class SettableParser extends DelegateParser {
SettableParser(parser) : super(parser);
- /**
- * Sets the receiver to delegate to [parser].
- */
+ /// Sets the receiver to delegate to [parser].
void set(Parser parser) => replace(children[0], parser);
@override
« no previous file with comments | « packages/petitparser/lib/src/petitparser/parser.dart ('k') | packages/petitparser/lib/src/petitparser/predicates.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698