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

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
« no previous file with comments | « dart/frog/leg/scanner/string_scanner.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/token.dart
diff --git a/dart/frog/leg/scanner/token.dart b/dart/frog/leg/scanner/token.dart
index fd079032e2c2252b236a4d86443edf55e0de59ac..215ec18d058b269036e0a0bb9228e3c05fa9b3e8 100644
--- a/dart/frog/leg/scanner/token.dart
+++ b/dart/frog/leg/scanner/token.dart
@@ -142,6 +142,8 @@ interface SourceString extends Hashable, Iterable<int> default StringWrapper {
String slowToString();
bool isEmpty();
+
+ bool isPrivate();
}
class StringWrapper implements SourceString {
@@ -174,6 +176,8 @@ class StringWrapper implements SourceString {
}
bool isEmpty() => stringValue.isEmpty();
+
+ bool isPrivate() => !isEmpty() && stringValue.charCodeAt(0) === $_;
}
class StringCodeIterator implements Iterator<int> {
« no previous file with comments | « dart/frog/leg/scanner/string_scanner.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698