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 java.lang.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 java.lang.String toString()
        Description copied from class: Statement
        Subclasses should return a String representing the parsed statement.
        Specified by:
        toString in class Statement
      • resetIdentifierType

        private void resetIdentifierType()
        If the identifier was initialized without a type specification and a null value, the identifier's type becomes that of it's first assignment. TODO cgross: I don't think this is necessary any more. Remove it.