1 /* This file was generated by SableCC (http://www.sablecc.org/). */
3 package org.simantics.basicexpression.node;
7 @SuppressWarnings("nls")
8 public abstract class Node implements Switchable, Cloneable
13 public abstract Object clone();
20 void parent(@SuppressWarnings("hiding") Node parent)
25 abstract void removeChild(Node child);
26 abstract void replaceChild(Node oldChild, Node newChild);
28 public void replaceBy(Node node)
30 this.parent.replaceChild(this, node);
33 protected String toString(Node node)
37 return node.toString();
43 protected String toString(List list)
45 StringBuffer s = new StringBuffer();
47 for(Iterator i = list.iterator(); i.hasNext();)
55 @SuppressWarnings("unchecked")
56 protected <T extends Node> T cloneNode(T node)
60 return (T) node.clone();
66 protected <T> List<T> cloneList(List<T> list)
68 List<T> clone = new LinkedList<T>();