Class: LibRubyParser::Nodes::Regexp
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Regexp
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents regex literal (e.g. /foo/
)
Instance Attribute Summary collapse
-
#begin_l ⇒ Loc
readonly
Location of the regex begin.
-
#end_l ⇒ Loc
readonly
Location of the regex end.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#options ⇒ Node?
readonly
Regex options.
-
#parts ⇒ ::Array<Node>
readonly
A list of static and dynamic regex parts.
Instance Attribute Details
#begin_l ⇒ Loc (readonly)
Location of the regex begin
/foo/
~
%r{foo}
~~
3449 3450 3451 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3449 def begin_l @begin_l end |
#end_l ⇒ Loc (readonly)
Location of the regex end
/foo/
~
%r{foo}
~
3461 3462 3463 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3461 def end_l @end_l end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
/foo/mix
~~~~~~~~
3470 3471 3472 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3470 def expression_l @expression_l end |
#options ⇒ Node? (readonly)
Regex options.
None
if regex has no explicit flags
3437 3438 3439 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3437 def @options end |
#parts ⇒ ::Array<Node> (readonly)
A list of static and dynamic regex parts
3431 3432 3433 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3431 def parts @parts end |