Class: LibRubyParser::Nodes::MatchWithLvasgn
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::MatchWithLvasgn
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents matching a regex that produces local variables (i.e. /(?<match>bar)/ =~ 'bar'
)
Each named group in regex declares a local variable.
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#operator_l ⇒ Loc
readonly
Location of the
=~
operatir. -
#re ⇒ Node
readonly
Regex that is used for matching.
-
#value ⇒ Node
readonly
Value that is used for matching.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
/(?<match>bar)/ =~ 'bar'
~~~~~~~~~~~~~~~~~~~~~~~~
2865 2866 2867 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2865 def expression_l @expression_l end |
#operator_l ⇒ Loc (readonly)
Location of the =~
operatir
/(?<match>bar)/ =~ 'bar'
~~
2856 2857 2858 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2856 def operator_l @operator_l end |
#re ⇒ Node (readonly)
Regex that is used for matching
2843 2844 2845 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2843 def re @re end |
#value ⇒ Node (readonly)
Value that is used for matching
2847 2848 2849 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2847 def value @value end |