Class: LibRubyParser::Nodes::MatchAlt
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::MatchAlt
- 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
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#lhs ⇒ Node
readonly
Left pattern.
-
#operator_l ⇒ Loc
readonly
Location of the
|
operator. -
#rhs ⇒ Node
readonly
Right pattern.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo in 1 | 2
~~~~~
2604 2605 2606 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2604 def expression_l @expression_l end |
#lhs ⇒ Node (readonly)
Left pattern
2582 2583 2584 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2582 def lhs @lhs end |
#operator_l ⇒ Loc (readonly)
Location of the |
operator
foo in 1 | 2
~
2595 2596 2597 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2595 def operator_l @operator_l end |
#rhs ⇒ Node (readonly)
Right pattern
2586 2587 2588 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2586 def rhs @rhs end |