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

Unified Diff: lib/compiler/implementation/scanner/listener.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 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
« no previous file with comments | « lib/compiler/implementation/scanner/keyword.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 2a0572d3d6488481f04ba04b19bc59e064da2b2b..43120e991db93a897087b6c2c0dd201a886a49cd 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -654,7 +654,7 @@ class ElementListener extends Listener {
// Library tags are only allowed in the library file itself, not
// in sourced files.
LibraryElement library = compilationUnitElement.getLibrary();
- return compilationUnitElement.localMembers.isEmpty()
+ return compilationUnitElement.localMembers.isEmpty
&& library.entryCompilationUnit == compilationUnitElement;
}
@@ -842,7 +842,7 @@ class ElementListener extends Listener {
modifiers,
enclosingElement);
for (Link<Node> variableNodes = variables.nodes;
- !variableNodes.isEmpty();
+ !variableNodes.isEmpty;
variableNodes = variableNodes.tail) {
Expression initializedIdentifier = variableNodes.head;
Identifier identifier = initializedIdentifier.asIdentifier();
@@ -990,7 +990,7 @@ class ElementListener extends Listener {
}
void pushElement(Element element) {
- for (Link link = metadata; !link.isEmpty(); link = link.tail) {
+ for (Link link = metadata; !link.isEmpty; link = link.tail) {
element.addMetadata(link.head);
}
metadata = const Link<MetadataAnnotation>();
@@ -1019,7 +1019,7 @@ class ElementListener extends Listener {
}
Node popNode() {
- assert(!nodes.isEmpty());
+ assert(!nodes.isEmpty);
Node node = nodes.head;
nodes = nodes.tail;
if (VERBOSE) log("pop $nodes");
@@ -1027,7 +1027,7 @@ class ElementListener extends Listener {
}
Node peekNode() {
- assert(!nodes.isEmpty());
+ assert(!nodes.isEmpty);
Node node = nodes.head;
if (VERBOSE) log("peek $node");
return node;
@@ -1913,6 +1913,6 @@ Node parse(DiagnosticListener diagnosticListener,
NodeListener listener = new NodeListener(diagnosticListener, element);
doParse(new Parser(listener));
Node node = listener.popNode();
- assert(listener.nodes.isEmpty());
+ assert(listener.nodes.isEmpty);
return node;
}
« no previous file with comments | « lib/compiler/implementation/scanner/keyword.dart ('k') | lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698