Class IntSwitchCase

java.lang.Object
org.jfuncmachine.compiler.model.SourceElement
org.jfuncmachine.compiler.model.expr.IntSwitchCase

public class IntSwitchCase extends SourceElement
Defines a case value for a switch statement containing a target value and the expression to be executed if the switch value matches the case value
  • Field Details

    • value

      public final int value
      The value of this case
    • expr

      public final Expression expr
      The expression to execute if the switch value equals this case value
  • Constructor Details

    • IntSwitchCase

      public IntSwitchCase(int value, Expression expr)
      Create a switch case
      Parameters:
      value - The value of this case
      expr - The expression to execute if the switch value equals this case value
    • IntSwitchCase

      public IntSwitchCase(int value, Expression expr, String filename, int lineNumber)
      Create a switch case
      Parameters:
      value - The value of this case
      expr - The expression to execute if the switch value equals this case value
      filename - The source filename containing this case
      lineNumber - The line number in the source filename where this case starts