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
#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
#can_bind?(subtree) ⇒ Boolean
17 18 19 |
# File 'lib/parslet/pattern/binding.rb', line 17 def can_bind?(subtree) true end |
#inspect ⇒ Object
13 14 15 |
# File 'lib/parslet/pattern/binding.rb', line 13 def inspect "#{bind_type_name}(#{symbol.inspect})" end |
#variable_name ⇒ Object
9 10 11 |
# File 'lib/parslet/pattern/binding.rb', line 9 def variable_name symbol end |