Interface AssignTarget

All Superinterfaces:
AssignTargetLike
All Known Subinterfaces:
ChangeTarget
All Known Implementing Classes:
AssignNode, IndexNode, VariableNode

public interface AssignTarget extends AssignTargetLike
Represents all nodes that can be assign targets
  • Method Details

    • loc

      me.topchetoeu.j2s.common.Location loc()
    • beforeAssign

      default void beforeAssign(CompileResult target)
      Called to perform calculations before the assigned value is calculated
    • afterAssign

      void afterAssign(CompileResult target, boolean pollute)
      Called to perform the actual assignemnt. Between the `beforeAssign` and this call a single value will have been pushed to the stack
      Parameters:
      pollute - Whether or not to leave the original value on the stack
    • assign

      default void assign(CompileResult target, boolean pollute)
    • toAssignTarget

      default AssignTarget toAssignTarget()
      Specified by:
      toAssignTarget in interface AssignTargetLike