Class VerilogIfStatementBranch

    • Constructor Detail

      • VerilogIfStatementBranch

        public VerilogIfStatementBranch​(VerilogNode parent)
        Creates an if-then-else statement branch.
        Parameters:
        parent - the parent node.
      • VerilogIfStatementBranch

        public VerilogIfStatementBranch​(VerilogIfStatementBranch.Type type,
                                        VerilogStatement statement,
                                        VerilogNode parent)
        Create an if-then-else statement branch.
        Parameters:
        type - the branch type.
        statement - the branch body.
        parent - the parent node.
    • Method Detail

      • isThen

        public boolean isThen()
        Checks whether the branch is THEN.
        Returns:
        true iff the branch is THEN.
      • isElse

        public boolean isElse()
        Checks whether the branch is ELSE.
        Returns:
        true iff the branch is ELSE.
      • setThen

        public void setThen()
        Sets the branch type to THEN.
      • setElse

        public void setElse()
        Sets the branch type to ELSE.
      • getStatement

        public VerilogStatement getStatement()
        Returns the branch body.
        Returns:
        the branch body.
      • setStatement

        public void setStatement​(VerilogStatement statement)
        Sets the branch body.
        Parameters:
        statement - the branch body.
      • getExpression

        public VerilogExpression getExpression()
        Returns the condition associated with the branch.
        Returns:
        the branch condition.