Change tabbing for everything....
[IRC.git] / Robust / src / IR / Tree / DeclarationNode.java
1 package IR.Tree;
2 import IR.VarDescriptor;
3
4 public class DeclarationNode extends BlockStatementNode {
5   VarDescriptor vd;
6   ExpressionNode init_en;
7   public DeclarationNode(VarDescriptor var, ExpressionNode en) {
8     vd=var;
9     init_en=en;
10   }
11
12   public String printNode(int indent) {
13     if (init_en==null)
14       return vd.toString();
15     else return vd.toString()+"="+init_en.printNode(0);
16   }
17
18   public ExpressionNode getExpression() {
19     return init_en;
20   }
21
22   public VarDescriptor getVarDescriptor() {
23     return vd;
24   }
25
26   public int kind() {
27     return Kind.DeclarationNode;
28   }
29 }