Exception: Parslet::UnconsumedInput

Inherits:
ParseFailed
  • Object
show all
Defined in:
lib/parslet.rb

Overview

Raised when the parse operation didn’t consume all of its input. In this case, it makes only limited sense to look at the error tree. Maybe the 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

Instance Attribute Summary

Attributes inherited from ParseFailed

#cause

Method Summary

Methods inherited from ParseFailed

#initialize

Constructor Details

This class inherits a constructor from Parslet::ParseFailed