Class: SyntaxTree::RegexpEnd
- Inherits:
-
Object
- Object
- SyntaxTree::RegexpEnd
- Defined in:
- lib/syntax_tree.rb
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
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the end of the regular expression.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ RegexpEnd
constructor
A new instance of RegexpEnd.
Constructor Details
#initialize(value:, location:) ⇒ RegexpEnd
Returns a new instance of RegexpEnd.
10005 10006 10007 10008 |
# File 'lib/syntax_tree.rb', line 10005 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
10003 10004 10005 |
# File 'lib/syntax_tree.rb', line 10003 def location @location end |
#value ⇒ Object (readonly)
- String
-
the end of the regular expression
10000 10001 10002 |
# File 'lib/syntax_tree.rb', line 10000 def value @value end |