Class: Regex::MonadicExpression
- Inherits:
-
CompoundExpression
- Object
- Expression
- CompoundExpression
- Regex::MonadicExpression
- Defined in:
- lib/regex/monadic_expression.rb
Overview
Abstract class. An element that is part of a regular expression & that can have up to one child sub-expression.
Direct Known Subclasses
CapturingGroup, Lookaround, MatchOption, NonCapturingGroup, Repetition
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
The (optional) child sub-expression.
Attributes inherited from Expression
Instance Method Summary collapse
-
#done! ⇒ Object
Notification that the parse tree construction is complete.
-
#initialize(theChild) ⇒ MonadicExpression
constructor
Constructor.
-
#lazy! ⇒ Object
Notification that all quantifiers are lazy.
Methods inherited from CompoundExpression
Methods inherited from Expression
Constructor Details
#initialize(theChild) ⇒ MonadicExpression
Constructor.
16 17 18 19 |
# File 'lib/regex/monadic_expression.rb', line 16 def initialize(theChild) super() @child = theChild end |
Instance Attribute Details
#child ⇒ Object (readonly)
The (optional) child sub-expression
12 13 14 |
# File 'lib/regex/monadic_expression.rb', line 12 def child @child end |
Instance Method Details
#done! ⇒ Object
Notification that the parse tree construction is complete.
22 23 24 |
# File 'lib/regex/monadic_expression.rb', line 22 def done! child.done! end |
#lazy! ⇒ Object
Notification that all quantifiers are lazy
27 28 29 |
# File 'lib/regex/monadic_expression.rb', line 27 def lazy! child.lazy! end |