コード例 #1
0
 public String toString() {
   if (declaration != null) {
     return declaration.toString() + "\n" + statement.toString();
   } else {
     return statement.toString();
   }
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 @Override
 public String toString() {
   return name + ":" + declaration.toString() + "@" + proximity;
 }