// $Id: ImmedExpr.java,v 1.1.1.1 1999/12/05 22:19:51 mpp Exp $

package IR2;

import java.util.*;

public abstract class ImmedExpr extends RValue {
  
  public String pretty_print(int indent, boolean recursive) {
    String output = new String();
    
    for (int i = 0; i < indent; i++) output += " ";
    if (recursive) {
      indent += 2;
      output += "(" + this.node_name() + "\n";
      /* stuff - calls to prettyprints of internals of this node*/
      for (Enumeration e = this.neighbors(); e.hasMoreElements();) {
        Walkable foo = (Walkable)e.nextElement();
        output += foo.pretty_print(indent, true);
      }
      for (int i = 0; i < indent; i++) output += " ";
      output += ") /* "+ this.node_name() + " */\n";
    } else {
      output += "(" + this.node_name() + ")\n";
    }
    return output;
  }
}
