Record Class BinaryOperatorParams

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.support.BinaryOperatorParams
Record Components:
leftOperand - Variable name holding the left operand
rightOperand - Variable name holding the right operand
operator - Operator method name (e.g., "+", "<", "<=>")
leftType - Type of left operand
rightType - Type of right operand
resultType - Expected result type
resultTemp - Variable name to store result
scopeId - Scope ID for memory management
debugInfo - Debug information for instructions

public record BinaryOperatorParams(String leftOperand, String rightOperand, String operator, ISymbol leftType, ISymbol rightType, ISymbol resultType, String resultTemp, String scopeId, DebugInfo debugInfo) extends Record
Parameters for binary operator invocation.

Encapsulates all data needed to invoke a binary operator with proper memory management and type resolution.

  • Constructor Details

    • BinaryOperatorParams

      public BinaryOperatorParams(String leftOperand, String rightOperand, String operator, ISymbol leftType, ISymbol rightType, ISymbol resultType, String resultTemp, String scopeId, DebugInfo debugInfo)
      Creates an instance of a BinaryOperatorParams record class.
      Parameters:
      leftOperand - the value for the leftOperand record component
      rightOperand - the value for the rightOperand record component
      operator - the value for the operator record component
      leftType - the value for the leftType record component
      rightType - the value for the rightType record component
      resultType - the value for the resultType record component
      resultTemp - the value for the resultTemp record component
      scopeId - the value for the scopeId record component
      debugInfo - the value for the debugInfo record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • leftOperand

      public String leftOperand()
      Returns the value of the leftOperand record component.
      Returns:
      the value of the leftOperand record component
    • rightOperand

      public String rightOperand()
      Returns the value of the rightOperand record component.
      Returns:
      the value of the rightOperand record component
    • operator

      public String operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • leftType

      public ISymbol leftType()
      Returns the value of the leftType record component.
      Returns:
      the value of the leftType record component
    • rightType

      public ISymbol rightType()
      Returns the value of the rightType record component.
      Returns:
      the value of the rightType record component
    • resultType

      public ISymbol resultType()
      Returns the value of the resultType record component.
      Returns:
      the value of the resultType record component
    • resultTemp

      public String resultTemp()
      Returns the value of the resultTemp record component.
      Returns:
      the value of the resultTemp record component
    • scopeId

      public String scopeId()
      Returns the value of the scopeId record component.
      Returns:
      the value of the scopeId record component
    • debugInfo

      public DebugInfo debugInfo()
      Returns the value of the debugInfo record component.
      Returns:
      the value of the debugInfo record component