Permalink
Browse files

. improve documentation

  • Loading branch information...
1 parent 9aee99a commit bc9126f442a50c69c9772494cf589b067d0ee559 @kschiess committed May 24, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/parslet.rb
View
@@ -88,6 +88,14 @@ def initialize(message, cause=nil)
# parser worked just fine, but didn't account for the characters at the tail
# of the input?
#
+ # str('foo').parse('foobar')
+ # # raises Parslet::UnconsumedInput:
+ # # Don't know what to do with "bar" at line 1 char 4.
+ #
+ # Note that you can have parslet ignore this error:
+ #
+ # str('foo').parse('foobar', prefix: true) # => "foo"@0
+ #
class UnconsumedInput < ParseFailed
end

0 comments on commit bc9126f

Please sign in to comment.