Class ExpressionBranch

    • Method Detail

      • create

        public static ExpressionBranch create​(ExpressionNode[] successBlock)
        Creates a new expression branch - always succeed, one success block.
        Parameters:
        successBlock - the block to use on conditional success.
        Returns:
        a new expression branch node.
      • create

        public static ExpressionBranch create​(ExpressionNode[] conditional,
                                              ExpressionNode[] successBlock)
        Creates a new expression branch, no failure block.
        Parameters:
        conditional - the conditional block. Must end in a directive that leaves a value on the stack.
        successBlock - the block to use on conditional success.
        Returns:
        a new expression branch node.
      • create

        public static ExpressionBranch create​(ExpressionNode[] conditional,
                                              ExpressionNode[] successBlock,
                                              ExpressionNode[] failureBlock)
        Creates a new expression branch, no failure block.
        Parameters:
        conditional - the conditional block. Must end in a directive that leaves a value on the stack.
        successBlock - the block to use on conditional success.
        failureBlock - the block to use on conditional failure.
        Returns:
        a new expression branch node.
      • isCollapsable

        public boolean isCollapsable()
        Description copied from interface: ExpressionNode
        Checks if this node is collapsable.
        Specified by:
        isCollapsable in interface ExpressionNode
        Returns:
        true if so, false if not.