Closed bvssvni closed 8 years ago
Currently, you need to call stderr_unwrap to display the error in the console. This makes the API a bit messy.
stderr_unwrap
Could write the error to a String and store it in ParseError.
String
ParseError
This could be done in parse, to avoid extra allocations when a rule backtracks. Return Result<Vec<(Range, MetaData)>, (Range, ParseError, String)>.
parse
Result<Vec<(Range, MetaData)>, (Range, ParseError, String)>
Could implement Display for (Range, ParseError, String) such that .unwrap() printed the formatted error to the console.
Display
(Range, ParseError, String)
.unwrap()
Closed in favor of https://github.com/PistonDevelopers/meta/issues/295.
Currently, you need to call
stderr_unwrap
to display the error in the console. This makes the API a bit messy.Could write the error to a
String
and store it inParseError
.This could be done in
parse
, to avoid extra allocations when a rule backtracks. ReturnResult<Vec<(Range, MetaData)>, (Range, ParseError, String)>
.Could implement
Display
for(Range, ParseError, String)
such that.unwrap()
printed the formatted error to the console.