001 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 002 // for details. All rights reserved. Use of this source code is governed by a 003 // BSD-style license that can be found in the LICENSE file. 004 005 package com.google.dart.compiler.backend.js.ast; 006 007 import com.intellij.util.SmartList; 008 import org.jetbrains.annotations.NotNull; 009 010 import java.util.List; 011 012 /** 013 * A member/case in a JavaScript switch object. 014 */ 015 public abstract class JsSwitchMember extends SourceInfoAwareJsNode { 016 protected final List<JsStatement> statements = new SmartList<JsStatement>(); 017 018 protected JsSwitchMember() { 019 super(); 020 } 021 022 public List<JsStatement> getStatements() { 023 return statements; 024 } 025 026 @Override 027 public void acceptChildren(JsVisitor visitor) { 028 visitor.acceptWithInsertRemove(statements); 029 } 030 031 @NotNull 032 @Override 033 public abstract JsSwitchMember deepCopy(); 034 }