Class: LibRubyParser::Nodes::MatchWithLvasgn

Inherits:
LibRubyParser::Node show all
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

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

/(?<match>bar)/ =~ 'bar'
~~~~~~~~~~~~~~~~~~~~~~~~

Returns:



2865
2866
2867
# File 'lib/lib-ruby-parser/nodes.rb', line 2865

def expression_l
  @expression_l
end

#operator_lLoc (readonly)

Location of the =~ operatir

/(?<match>bar)/ =~ 'bar'
                ~~

Returns:



2856
2857
2858
# File 'lib/lib-ruby-parser/nodes.rb', line 2856

def operator_l
  @operator_l
end

#reNode (readonly)

Regex that is used for matching

Returns:



2843
2844
2845
# File 'lib/lib-ruby-parser/nodes.rb', line 2843

def re
  @re
end

#valueNode (readonly)

Value that is used for matching

Returns:



2847
2848
2849
# File 'lib/lib-ruby-parser/nodes.rb', line 2847

def value
  @value
end