# File lib/parslet/atoms/re.rb, line 23 def try(source, context, consume_all) return succ(source.consume(1)) if source.matches?(re) # No string could be read return context.err(self, source, @error_msgs[:premature]) \ if source.chars_left < 1 # No match return context.err(self, source, @error_msgs[:failed]) end