Preserve newlines across tokenization, so we can catch invalid documents with
unexpected newlines at parse-time
I'm not sure if this was the right way to solve this, or if there's a way to
let tokenization itself fail on unexpected newlines -- but not have the
parser ever need to know about them. Let me know what you think.
Replace calls to error with monadic failure, so we get parse errors, not
exceptions, on certain invalid documents.
Preserve newlines across tokenization, so we can catch invalid documents with unexpected newlines at parse-time
I'm not sure if this was the right way to solve this, or if there's a way to let tokenization itself fail on unexpected newlines -- but not have the parser ever need to know about them. Let me know what you think.
Replace calls to
error
with monadic failure, so we get parse errors, not exceptions, on certain invalid documents.