Class: SyntaxTree::RegexpEnd
Overview
RegexpEnd represents the end of a regular expression literal.
/.+/m
In the example above, the RegexpEnd event represents the /m at the end of the regular expression literal. You can also declare regular expression literals using %r, as in:
%r{.+}m
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
[String] the end of the regular expression.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ RegexpEnd
constructor
A new instance of RegexpEnd.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ RegexpEnd
Returns a new instance of RegexpEnd.
8302 8303 8304 8305 |
# File 'lib/syntax_tree/node.rb', line 8302 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
[String] the end of the regular expression
8300 8301 8302 |
# File 'lib/syntax_tree/node.rb', line 8300 def value @value end |