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

Side by Side Diff: frog/leg/elements/elements.dart

Issue 9632018: Switch-implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Finished implementation 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | frog/leg/lib/js_helper.dart » ('j') | frog/leg/lib/js_helper.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('elements'); 5 #library('elements');
6 6
7 #import('../tree/tree.dart'); 7 #import('../tree/tree.dart');
8 #import('../scanner/scannerlib.dart'); 8 #import('../scanner/scannerlib.dart');
9 #import('../leg.dart'); // TODO(karlklose): we only need type. 9 #import('../leg.dart'); // TODO(karlklose): we only need type.
10 #import('../util/util.dart'); 10 #import('../util/util.dart');
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); 854 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement);
855 bool get isTarget() => isBreakTarget || isContinueTarget; 855 bool get isTarget() => isBreakTarget || isContinueTarget;
856 856
857 LabelElement addLabel(Identifier label, String labelName) { 857 LabelElement addLabel(Identifier label, String labelName) {
858 LabelElement result = new LabelElement(label, labelName, this, 858 LabelElement result = new LabelElement(label, labelName, this,
859 enclosingElement); 859 enclosingElement);
860 labels = labels.prepend(result); 860 labels = labels.prepend(result);
861 return result; 861 return result;
862 } 862 }
863 863
864 String implicitLabel() => null;
865
864 Node parseNode(DiagnosticListener l) => statement; 866 Node parseNode(DiagnosticListener l) => statement;
ahe 2012/03/09 13:58:32 Unrelated note: I think it would be nice if you ov
Lasse Reichstein Nielsen 2012/03/12 13:05:23 Done.
865 } 867 }
868
869 class SwitchStatementElement extends StatementElement {
Lasse Reichstein Nielsen 2012/03/12 13:05:23 Folded this into StatementElement, using nesting-l
870 final String uniqueId;
871 SwitchStatementElement(Statement statement, Element enclosingElement,
872 int implicitId)
873 : uniqueId = "$implicitId", super(statement, enclosingElement);
874 String implicitLabel() => uniqueId;
875 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/lib/js_helper.dart » ('j') | frog/leg/lib/js_helper.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698