a start on error inject for SSJava
[IRC.git] / Robust / src / IR / Tree / SwitchStatementNode.java
1 package IR.Tree;
2
3 public class SwitchStatementNode extends BlockStatementNode {
4   ExpressionNode cond;
5   BlockNode switch_st;
6
7   public SwitchStatementNode(ExpressionNode cond, BlockNode switch_st) {
8     this.cond = cond;
9     this.switch_st = switch_st;
10   }
11
12   public ExpressionNode getCondition() {
13     return cond;
14   }
15
16   public BlockNode getSwitchBody() {
17     return this.switch_st;
18   }
19
20   public String printNode(int indent) {
21     return "switch(" + cond.printNode(indent) + ") " + switch_st.printNode(indent);
22   }
23
24   public int kind() {
25     return Kind.SwitchStatementNode;
26   }
27 }