public String toString() { if (declaration != null) { return declaration.toString() + "\n" + statement.toString(); } else { return statement.toString(); } }
public void printWithLabels() { System.out.println("Input Program with labels added:"); if (declaration != null) { System.out.println(declaration.toString()); } if (statement != null) { statement.printWithLabels(1); } System.out.println(); }