Commit Graph

12 Commits

Author SHA1 Message Date
Geoffroy Couprie
55bac0bfa8 fmt 2018-02-17 15:06:43 +01:00
Geoffroy Couprie
9a4a7668b1 fmt 2018-01-18 15:32:53 +01:00
Geoffroy Couprie
9608061d26 remove warnings 2018-01-13 17:03:41 +01:00
Geoffroy Couprie
6d5b23632d fix Incomplete usage in many* parsers
this is a breaking change in their behaviour:
- if they receive an empty input, they will return incomplete (if not at
eof)
- if they reach the end of input without the child parser returning an
error, they will return Incomplete

while this may break some parsers, this behaviour is more logical with
the rest of nom and much stricter
2018-01-13 16:44:21 +01:00
Geoffroy Couprie
54d1fae5b9 use error conversion everywhere
if type inference for the error type (E) still appear, it means I forgot
to use error conversion somewhere
2017-09-21 12:04:53 +02:00
Geoffroy Couprie
6a15807cd4 move from IResult to Result
this will make it easier to be compatible with other crates like
error_chain, and we can reuse a lot of code coming for free with
Result. Incomplete is merged into the error side. I still do not
consider it to be an error,but this side will also contain unrecoverable
errors at some point (errors that cause alt and others to return
instead of testing the next branch), so it will be easier to put it in
this enum.
2017-09-07 14:32:20 +02:00
Marc-Antoine Perennou
479e960e6a sync the src/lib comment with the arithmetic test
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-10-22 15:38:06 +02:00
Marc-Antoine Perennou
433accaec8 tests/arithmetic: don't use chain!
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-10-22 15:38:06 +02:00
Geoffroy Couprie
63458f32d7 use ws! in one of the arithmetic examples 2016-08-29 12:47:23 +02:00
Geoffroy Couprie
60d8071af9 Fix compilation 2015-09-09 15:42:32 +02:00
Geoffroy Couprie
a413d4be1a initial work for typed errors 2015-09-09 15:41:32 +02:00
Geoffroy Couprie
4cb86901e1 Arithmetic expression parser and evaluator 2015-07-18 19:01:09 +02:00