Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Stricter handling of input #5
This is a set of changes to the way input is handled in Peppercorn.
The recommended usage doesn't mention that
The test suite already accounts for
Presumably the correct usage would be:
It assumes access to a framework-specific exception, though.
The first commit establishes a
The second commit takes the documentation at face value ("Mappings and sequences can be nested arbitrarily") and makes it so. This is done by replacing the recursive implementation with one that uses a list as a stack.
Doing this brought on another thing:
The non-recursive implementation passed the full test suite even if (as I discoverd later) it handled extra end markers differently.
I added some tests and contorted it a bit to preserve the original behaviour.
I still think that an input like
This is done in the last commit. I separated the end tests as they might be useful even if you disagree.