Class: Parslet::Pattern::SubtreeBind
- Inherits:
-
Struct
- Object
- Struct
- Parslet::Pattern::SubtreeBind
- Defined in:
- lib/parslet/pattern/binding.rb
Overview
Used internally for representing a bind placeholder in a Parslet::Transform pattern. This is the superclass for all bindings.
It defines the most permissive kind of bind, the one that matches any subtree whatever it looks like.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#symbol ⇒ Object
Returns the value of attribute symbol.
Instance Method Summary collapse
Instance Attribute Details
permalink #symbol ⇒ Object
Returns the value of attribute symbol
8 9 10 |
# File 'lib/parslet/pattern/binding.rb', line 8 def symbol @symbol end |
Instance Method Details
permalink #can_bind?(subtree) ⇒ Boolean
17 18 19 |
# File 'lib/parslet/pattern/binding.rb', line 17 def can_bind?(subtree) true end |
permalink #inspect ⇒ Object
[View source]
13 14 15 |
# File 'lib/parslet/pattern/binding.rb', line 13 def inspect "#{bind_type_name}(#{symbol.inspect})" end |
permalink #variable_name ⇒ Object
[View source]
9 10 11 |
# File 'lib/parslet/pattern/binding.rb', line 9 def variable_name symbol end |