Class: SyntaxTree::RegexpBeg
Overview
RegexpBeg represents the start of a regular expression literal.
/.+/
In the example above, RegexpBeg represents the first / token. Regular expression literals can also be declared using the %r syntax, as in:
%r{.+}
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- String
-
the beginning of the regular expression.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ RegexpBeg
constructor
A new instance of RegexpBeg.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ RegexpBeg
Returns a new instance of RegexpBeg.
8282 8283 8284 8285 |
# File 'lib/syntax_tree/node.rb', line 8282 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the beginning of the regular expression
8280 8281 8282 |
# File 'lib/syntax_tree/node.rb', line 8280 def value @value end |