After compiling an MVEL expression, I can access the top ASTNode.
ExpressionCompiler compiler = new ExpressionCompiler(<expression>, true);
ASTNode node = compiler.compile().getFirstNode();
However, I would like to have full access to the ASTNode info, including its left and right child nodes.
ASTNode left = node.getLeftNode();
ASTNode right = node.getRightNode();
...
Is there a way to do it?
If an expression has a binary operator, for example, (a + b), the corresponding ASTNode is of type BineryOperation. Therefore, the following code can be used to solve the issue: