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

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

Issue 10389113: Make a single labeled statement hold all its labels. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 31c1b0b716d1f0ca7f73eacfd75e352d2d841c2d..c73885c7ccdebb720d27a01a4a9c9a11b4688339 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -1446,12 +1446,8 @@ class NodeListener extends ElementListener {
void endLabeledStatement(int labelCount) {
Statement statement = popNode();
- while (labelCount > 0) {
- Label label = popNode();
- statement = new LabeledStatement(label, statement);
- labelCount--;
- }
- pushNode(statement);
+ NodeList labels = makeNodeList(labelCount, null, null, null);
+ pushNode(new LabeledStatement(labels, statement));
}
void log(message) {

Powered by Google App Engine
This is Rietveld 408576698