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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart

Issue 24481002: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
index 769fdf15ded20a58372e6049da944500be6de52e..be03c5002b3a1a8a0eef18c8fb46bdfe4c3b5afe 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
@@ -502,6 +502,10 @@ bool javaSetAdd(Set s, o) {
return false;
}
+bool javaCollectionContainsAll(Iterable list, Iterable c) {
+ return c.fold(true, (bool prev, e) => prev && list.contains(e));
+}
+
javaMapPut(Map target, key, value) {
var oldValue = target[key];
target[key] = value;
@@ -562,3 +566,21 @@ abstract class Enum<E extends Enum> implements Comparable<E> {
String toString() => name;
int compareTo(E other) => ordinal - other.ordinal;
}
+
+class JavaPatternMatcher {
+ Iterator<Match> _matches;
+ Match _match;
+ JavaPatternMatcher(RegExp re, String input) {
+ _matches = re.allMatches(input).iterator;
+ }
+ bool find() {
+ if (!_matches.moveNext()) {
+ return false;
+ }
+ _match = _matches.current;
+ return true;
+ }
+ String group(int i) => _match[i];
+ int start() => _match.start;
+ int end() => _match.end;
+}

Powered by Google App Engine
This is Rietveld 408576698