View Javadoc

1   /* Generated By:JJTree: Do not edit this line. ASTReference.java */
2   
3   package org.osoco.dyninc.parser;
4   
5   import org.osoco.dyninc.Context;
6   
7   
8   public class ASTReference extends SimpleNode {
9       
10      SimpleNode root;
11      
12    public ASTReference(int id) {
13      super(id);
14    }
15  
16    public ASTReference(Parser p, int id) {
17      super(p, id);
18    }
19  
20    public static Node jjtCreate(int id) {
21        return new ASTReference(id);
22    }
23  
24    public static Node jjtCreate(Parser p, int id) {
25        return new ASTReference(p, id);
26    }
27  
28    /*** Accept the visitor. **/
29    public Object jjtAccept(ParserVisitor visitor, Object data) {
30      return visitor.visit(this, data);
31    }
32  
33    public void jjtClose()
34    {
35        root = (SimpleNode) jjtGetChild(0);
36    }
37  
38    protected Object getValue(Context context, Object current)
39    throws Exception {
40        for(int i=0; i<jjtGetNumChildren(); i++) {
41            current = ( (SimpleNode) jjtGetChild(i)).getValue(context, current);
42  
43            if (current == null) {
44                return null;
45            }
46        }
47  
48        return current;
49    }
50  
51  }