checked in changes
[IRC.git] / Robust / src / IR / Tree / ParseNode.java
index 6d414bb34fec3febde1c7a96660d3a093a5dae19..e5e34d2183ddaf3a29a8ca7c0cd94753245a2790 100644 (file)
@@ -48,7 +48,7 @@ public class ParseNode implements Walkable {
        literal=o;
     }
 
-    public Object getLiteral(Object o) {
+    public Object getLiteral() {
        return literal;
     }
 
@@ -111,7 +111,7 @@ public class ParseNode implements Walkable {
     public ParseNode addChild( ParseNode child ) {
 
        if (child == null) {
-           throw new NullPointerException("Can't add null node to parse tree");
+           throw new NullPointerException("Can't add null node to parse tree: "+getLabel());
        }
 
        children.addElement (child);
@@ -165,6 +165,9 @@ public class ParseNode implements Walkable {
        }
     }
 
+    public ParseNode getFirstChild() {
+       return children.elementAt(0);
+    }
 
     public ParseNodeVector getChildren(String label) {
        int i;