spec/parslet/pattern_spec.rb
# This is the more modern version of verifying a match: (uses 'exp'
# implicitly). Checks for a match of pattern in +exp+ and yields the
# matched variables.
#
This is the more modern version of verifying a match: (uses 'exp'
implicitly). Checks for a match of pattern in +exp+ and yields the
matched variables.
This is the more modern version of verifying a match : ( uses ' exp ' implicitly ) . Checks for a match of pattern in + exp + and yields the matched variables .
def with_match_locals(pattern, &block) 
    bindings = p(pattern).match(exp)
    bindings.should_not be_nil
    block.call(bindings) if block
  end
def with_match_locals ( pattern , & block ) bindings = p ( pattern ) . match ( exp ) bindings . should_not be_nil block . call ( bindings ) if block end
This is the more modern version of verifying a match: (uses 'exp'
implicitly).
This is the more modern version of verifying a match : ( uses ' exp ' implicitly ) .
pattern
<not_specific>
block
<not_specific>