예제 #1
0
파일: NodeFactory.java 프로젝트: tomka/fiji
 /**
  * Creates an ASTConstant node with specified value. This method should be overwritten by
  * subclasses.
  *
  * @throws ParseException
  */
 public ASTConstant buildConstantNode(Object value) throws ParseException {
   ASTConstant node = new ASTConstant(ParserTreeConstants.JJTCONSTANT);
   node.setValue(value);
   return node;
 }
예제 #2
0
파일: NodeFactory.java 프로젝트: tomka/fiji
 /**
  * Create an ASTConstant with same value as argument. *
  *
  * @throws ParseException
  */
 public ASTConstant buildConstantNode(ASTConstant node) throws ParseException {
   return buildConstantNode(node.getValue());
 }
예제 #3
0
 /** Visit a constant node. The value of the constant is pushed onto the stack. */
 public Object visit(ASTConstant node, Object data) {
   stack.push(node.getValue());
   return data;
 }