Method: Parslet::Accelerator::Engine#try_bind
- Defined in:
- lib/parslet/accelerator/engine.rb
#try_bind(variable, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/parslet/accelerator/engine.rb', line 88 def try_bind(variable, value) if bound? variable return value == lookup(variable) else case variable when Symbol bind(variable, value) else # This does not look like a variable - let's try matching it against # the value: variable === value end end end |