Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } | |
| OLD | NEW |