/** {@inheritDoc} */ public Object visit(ASTWhileStatement node, Object data) { Object result = null; /* first objectNode is the expression */ Node expressionNode = node.jjtGetChild(0); while (arithmetic.toBoolean(expressionNode.jjtAccept(this, data))) { if (isCancelled()) { throw new JexlException.Cancel(node); } // execute statement if (node.jjtGetNumChildren() > 1) { result = node.jjtGetChild(1).jjtAccept(this, data); } } return result; }