Class: LibRubyParser::Nodes::Regexp

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

Overview

Represents regex literal (e.g. /foo/)

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc (readonly)

Location of the regex begin

/foo/
~

%r{foo}
~~

Returns:



3449
3450
3451
# File 'lib/lib-ruby-parser/nodes.rb', line 3449

def begin_l
  @begin_l
end

#end_lLoc (readonly)

Location of the regex end

/foo/
    ~

%r{foo}
      ~

Returns:



3461
3462
3463
# File 'lib/lib-ruby-parser/nodes.rb', line 3461

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

/foo/mix
~~~~~~~~

Returns:



3470
3471
3472
# File 'lib/lib-ruby-parser/nodes.rb', line 3470

def expression_l
  @expression_l
end

#optionsNode? (readonly)

Regex options.

None if regex has no explicit flags

Returns:



3437
3438
3439
# File 'lib/lib-ruby-parser/nodes.rb', line 3437

def options
  @options
end

#parts::Array<Node> (readonly)

A list of static and dynamic regex parts

Returns:



3431
3432
3433
# File 'lib/lib-ruby-parser/nodes.rb', line 3431

def parts
  @parts
end