throw new SimpleParserException("Logical operator " + operator + " does not support left hand side token " + left.getToken(), token.getToken().getIndex());
}
if (right == null) {
throw new SimpleParserException("Logical operator " + operator + " has no right hand side token", token.getToken().getIndex());
}
if (!logical.acceptRightNode(right)) {
throw new SimpleParserException("Logical operator " + operator + " does not support right hand side token " + left.getToken(), token.getToken().getIndex());
}
// pop previous as we need to replace it with this binary operator
stack.pop();