Class ASTExprOpBinary


public final class ASTExprOpBinary extends ASTExpression
Binary operator expression, including semantic refinements for context-sensitive LPC operators.
  • Constructor Details

  • Method Details

    • left

      public ASTExpression left()
    • right

      public ASTExpression right()
    • operator

      public BinaryOpType operator()
    • setInferredType

      public void setInferredType(LPCType inferredType)
      Records the type selected by semantic analysis when an operator is ambiguous without context.

      For example, mixed + mixed in an explicit string destination is treated as LPC string concatenation, while the same expression without that expected type remains numeric by default. JVMud uses this for narrow LPMud compatibility idioms such as legacy text efuns that return mixed, not as a general license to infer arbitrary operator meanings from context.

      Parameters:
      inferredType - resolved expression type, or null to fall back to structural inference
    • lpcType

      public LPCType lpcType()
      Specified by:
      lpcType in class ASTExpression