Chromium Code Reviews| Index: lib/compiler/implementation/elements/elements.dart |
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart |
| index 35aae1193e7ec007e2c9bf4053842eb8c84c1616..9b7511e1928f26bbfd14d0abec0510c1fd441312 100644 |
| --- a/lib/compiler/implementation/elements/elements.dart |
| +++ b/lib/compiler/implementation/elements/elements.dart |
| @@ -985,15 +985,15 @@ class Elements { |
| class LabelElement extends Element { |
| - final Identifier label; |
| + final Label label; |
|
ahe
2012/05/10 11:52:30
Could you add a comment explaining why you need th
Lasse Reichstein Nielsen
2012/05/10 12:14:20
Done.
|
| final String labelName; |
| final TargetElement target; |
| bool isBreakTarget = false; |
| bool isContinueTarget = false; |
| - LabelElement(Identifier label, this.labelName, this.target, |
| + LabelElement(Label label, this.labelName, this.target, |
| Element enclosingElement) |
| : this.label = label, |
| - super(label.source, ElementKind.LABEL, enclosingElement); |
| + super(label.identifier.source, ElementKind.LABEL, enclosingElement); |
| void setBreakTarget() { |
| isBreakTarget = true; |
| @@ -1007,7 +1007,7 @@ class LabelElement extends Element { |
| bool get isTarget() => isBreakTarget || isContinueTarget; |
| Node parseNode(DiagnosticListener l) => label; |
| - Token position() => label.token; |
| + Token position() => label.getBeginToken(); |
| String toString() => "${labelName}:"; |
| } |
| @@ -1025,7 +1025,7 @@ class TargetElement extends Element { |
| : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); |
| bool get isTarget() => isBreakTarget || isContinueTarget; |
| - LabelElement addLabel(Identifier label, String labelName) { |
| + LabelElement addLabel(Label label, String labelName) { |
| LabelElement result = new LabelElement(label, labelName, this, |
| enclosingElement); |
| labels = labels.prepend(result); |