| 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 package com.google.dart.compiler.ast; | 5 package com.google.dart.compiler.ast; |
| 6 | 6 |
| 7 import java.util.List; | 7 import java.util.List; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Represents a Dart 'case' switch member. | 10 * Represents a Dart 'case' switch member. |
| 11 */ | 11 */ |
| 12 public class DartCase extends DartSwitchMember { | 12 public class DartCase extends DartSwitchMember { |
| 13 | 13 |
| 14 private DartExpression expr; | 14 private DartExpression expr; |
| 15 | 15 |
| 16 public DartCase(DartExpression expr, DartLabel label, List<DartStatement> stat
ements) { | 16 public DartCase(DartExpression expr, List<DartLabel> labels, List<DartStatemen
t> statements) { |
| 17 super(label, statements); | 17 super(labels, statements); |
| 18 this.expr = becomeParentOf(expr); | 18 this.expr = becomeParentOf(expr); |
| 19 } | 19 } |
| 20 | 20 |
| 21 public DartExpression getExpr() { | 21 public DartExpression getExpr() { |
| 22 return expr; | 22 return expr; |
| 23 } | 23 } |
| 24 | 24 |
| 25 @Override | 25 @Override |
| 26 public void visitChildren(ASTVisitor<?> visitor) { | 26 public void visitChildren(ASTVisitor<?> visitor) { |
| 27 safelyVisitChild(expr, visitor); | 27 safelyVisitChild(expr, visitor); |
| 28 super.visitChildren(visitor); | 28 super.visitChildren(visitor); |
| 29 } | 29 } |
| 30 | 30 |
| 31 @Override | 31 @Override |
| 32 public <R> R accept(ASTVisitor<R> visitor) { | 32 public <R> R accept(ASTVisitor<R> visitor) { |
| 33 return visitor.visitCase(this); | 33 return visitor.visitCase(this); |
| 34 } | 34 } |
| 35 } | 35 } |
| OLD | NEW |