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

Unified Diff: packages/petitparser/lib/src/reflection/optimize.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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/reflection/optimize.dart
diff --git a/packages/petitparser/lib/src/reflection/optimize.dart b/packages/petitparser/lib/src/reflection/optimize.dart
deleted file mode 100644
index c9dd84795aeef4a451406b99f81341c6193c3178..0000000000000000000000000000000000000000
--- a/packages/petitparser/lib/src/reflection/optimize.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-part of petitparser.reflection;
-
-/// Returns a copy of [parser] with all settable parsers removed.
-Parser removeSettables(Parser parser) {
- return transformParser(parser, (each) {
- while (each is SettableParser) {
- each = each.children.first;
- }
- return each;
- });
-}
-
-/// Returns a copy of [parser] with all duplicates parsers collapsed.
-Parser removeDuplicates(Parser parser) {
- var uniques = new Set();
- return transformParser(parser, (source) {
- var target = uniques.firstWhere((each) {
- return source != each && source.isEqualTo(each);
- }, orElse: () => null);
- if (target == null) {
- uniques.add(source);
- return source;
- } else {
- return target;
- }
- });
-}
« no previous file with comments | « packages/petitparser/lib/src/reflection/iterable.dart ('k') | packages/petitparser/lib/src/reflection/transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698