class SyntaxTree::RegexpEnd
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
Attributes
- String
-
the end of the regular expression
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 9180 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 9206 def ===(other) other.is_a?(RegexpEnd) && value === other.value end
Source
# File lib/syntax_tree/node.rb, line 9185 def accept(visitor) visitor.visit_regexp_end(self) end
Source
# File lib/syntax_tree/node.rb, line 9189 def child_nodes [] end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 9193 def copy(value: nil, location: nil) RegexpEnd.new( value: value || self.value, location: location || self.location ) end
Source
# File lib/syntax_tree/node.rb, line 9202 def deconstruct_keys(_keys) { value: value, location: location } end