Class AssignmentStatement

    • Constructor Detail

      • AssignmentStatement

        public AssignmentStatement()
    • Method Detail

      • setIdentifier

        public void setIdentifier​(Identifier identifier)
        Parameters:
        identifier - The left-hand-side identifier of the expression.
      • setExpression

        public void setExpression​(Expression expression)
        Parameters:
        expression - The right-hand-side expression of the assignment.
      • execute

        public Object execute()
        Execute the expression. Evaluates the RHS and assigns the resulting value to the symbol referenced by the LHS identifier.
        Specified by:
        execute in interface IStatement
        Overrides:
        execute in class Statement
      • toString

        public String toString()
        Description copied from class: Statement
        Subclasses should return a String representing the parsed statement.
        Specified by:
        toString in class Statement