Class Nodes.CaseNode

java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.CaseNode
Enclosing class:
Nodes

public static final class Nodes.CaseNode extends Nodes.Node
 Represents the use of a case statement.

     case true
     when false
     end
     ^^^^^^^^^^
 
  • Field Details

    • predicate

      public final Nodes.Node predicate
       Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
      
           case true; when false; end
           ^^^^
       
    • conditions

      public final Nodes.WhenNode[] conditions
       Represents the conditions of the case statement.
      
           case true; when false; end
                      ^^^^^^^^^^
       
    • else_clause

      public final Nodes.ElseNode else_clause
       Represents the else clause of the case statement.
      
           case true; when false; else; end
                                  ^^^^
       
  • Constructor Details

  • Method Details