Package org.prism

Class Nodes.ArrayPatternNode

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

public static final class Nodes.ArrayPatternNode extends Nodes.Node
 Represents an array pattern in pattern matching.

     foo in 1, 2
     ^^^^^^^^^^^

     foo in [1, 2]
     ^^^^^^^^^^^^^

     foo in *bar
     ^^^^^^^^^^^

     foo in Bar[]
     ^^^^^^^^^^^^

     foo in Bar[1, 2, 3]
     ^^^^^^^^^^^^^^^^^^^
 
  • Field Details

    • constant

      public final Nodes.Node constant
       Represents the optional constant preceding the Array
      
           foo in Bar[]
                  ^^^
      
           foo in Bar[1, 2, 3]
                  ^^^
      
           foo in Bar::Baz[1, 2, 3]
                  ^^^^^^^^
       
    • requireds

      public final Nodes.Node[] requireds
       Represents the required elements of the array pattern.
      
           foo in [1, 2]
                   ^  ^
       
    • rest

      public final Nodes.Node rest
       Represents the rest element of the array pattern.
      
           foo in *bar
                  ^^^^
       
    • posts

      public final Nodes.Node[] posts
       Represents the elements after the rest element of the array pattern.
      
           foo in *bar, baz
                        ^^^
       
  • Constructor Details

  • Method Details