Class Nodes.CaseMatchNode

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

public static final class Nodes.CaseMatchNode extends Nodes.Node
 Represents the use of a case statement for pattern matching.

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

    • predicate

      public final Nodes.Node predicate
       Represents the predicate of the case match. 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; in false; end
           ^^^^
       
    • conditions

      public final Nodes.InNode[] conditions
       Represents the conditions of the case match.
      
           case true; in false; end
                      ^^^^^^^^
       
    • else_clause

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

  • Method Details