Interface Operation

All Known Implementing Classes:
BinaryOperation, UnaryOperation

public sealed interface Operation permits UnaryOperation, BinaryOperation
Represents a general operation in the Naftah language.

This is a sealed interface that restricts its implementations to UnaryOperation and BinaryOperation.

Author:
Chakib Daii
  • Method Details

    • newNaftahBugNoEnumValueError

      static NaftahBugError newNaftahBugNoEnumValueError(Class<? extends Operation> operation, String op)
      Creates a NaftahBugError indicating that no enum constant was found for the given operator symbol in the specified Operation enum class.
      Parameters:
      operation - the enum class where the operator was expected
      op - the operator symbol (e.g., "+", "AND", etc.)
      Returns:
      a NaftahBugError with an Arabic error message