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

Unified Diff: dart/frog/leg/scanner/token.dart

Issue 9689045: Library privacy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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: dart/frog/leg/scanner/token.dart
diff --git a/dart/frog/leg/scanner/token.dart b/dart/frog/leg/scanner/token.dart
index 2e4676d2e840c67fad9f6526575b325e3a0f4e53..fd2138d70da0789bb587856f97506a40bee4a20a 100644
--- a/dart/frog/leg/scanner/token.dart
+++ b/dart/frog/leg/scanner/token.dart
@@ -140,6 +140,8 @@ interface SourceString extends Hashable, Iterable<int> default StringWrapper {
String get stringValue();
bool isEmpty();
+
+ bool isPrivate();
}
class StringWrapper implements SourceString {
@@ -172,6 +174,8 @@ class StringWrapper implements SourceString {
}
bool isEmpty() => stringValue.isEmpty();
+
+ bool isPrivate() => !isEmpty() && stringValue.charCodeAt(0) === $_;
}
class StringCodeIterator implements Iterator<int> {

Powered by Google App Engine
This is Rietveld 408576698