Class: LibRubyParser::Nodes::MatchAlt

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents pattern matching using one of the given patterns (i.e. foo in 1 | 2)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

foo in 1 | 2
       ~~~~~

Returns:



2604
2605
2606
# File 'lib/lib-ruby-parser/nodes.rb', line 2604

def expression_l
  @expression_l
end

#lhsNode (readonly)

Left pattern

Returns:



2582
2583
2584
# File 'lib/lib-ruby-parser/nodes.rb', line 2582

def lhs
  @lhs
end

#operator_lLoc (readonly)

Location of the | operator

foo in 1 | 2
         ~

Returns:



2595
2596
2597
# File 'lib/lib-ruby-parser/nodes.rb', line 2595

def operator_l
  @operator_l
end

#rhsNode (readonly)

Right pattern

Returns:



2586
2587
2588
# File 'lib/lib-ruby-parser/nodes.rb', line 2586

def rhs
  @rhs
end