Commit Graph

30 Commits

Author SHA1 Message Date
Geoffroy Couprie
43ed4e99f3 Merge branch 'alloc-feature' of https://github.com/kamarkiewicz/nom into kamarkiewicz-alloc-feature 2018-02-17 16:07:16 +01:00
Geoffroy Couprie
55bac0bfa8 fmt 2018-02-17 15:06:43 +01:00
Kamil Markiewicz
791a53cf62
WIP tests behind alloc 2018-02-05 23:18:40 +01:00
Geoffroy Couprie
d6f35cc341 fix unit tests in no_std and verbose-errors 2018-01-24 17:40:52 +01:00
Geoffroy Couprie
62a0e75a70 add a test for issue 667 2018-01-24 17:16:07 +01:00
Geoffroy Couprie
526299c2a6 support dbg_dmp for CompleteByteSlice 2018-01-24 16:36:34 +01:00
Geoffroy Couprie
7bc5d426df Fix byte indexing in not_line_ending 2018-01-15 12:07:51 +01:00
Geoffroy Couprie
47deaa1d03 many0 should not return until its child parser fails
if we reached the end of input, test with at_eof, to see if we should
return the whole input slice or not.
This will potentially break some existing parsers that rely on many0
trying to consume everything, but this behaviour is more correct and
aligned with the rest of nom
2018-01-11 19:29:46 +01:00
Geoffroy Couprie
484f6724ea rewrite the take_* combinators
- the combinators that do not expect a terminator (take_while, take_till) will return the whole input if input.at_eof() is true
- the combinators with the 1 suffix will return an error instead of an empty slice, even if we found the terminating tag
- combinators that expect a terminating tag but do not find it will return an error if input.at_eof() is true, incomplete if it is false
2018-01-11 15:36:51 +01:00
Geoffroy Couprie
e58efb7f93 start using rustfmt 2017-12-10 19:50:12 +01:00
Geoffroy Couprie
e9ffca6871 fix some clippy warnings 2017-12-10 15:53:50 +01:00
Geoffroy Couprie
d7d91d2ede remove some warnings 2017-12-09 16:12:57 +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
meh
0640736bd5 Fix one_of, none_of, and char when meeting UTF-8 chars 2017-07-04 12:44:46 +02:00
Geoffroy Couprie
e83f136814 remove some warnings 2017-06-16 14:35:34 +02:00
Geoffroy Couprie
678d65df79 remove a test that relies on optional features 2017-05-11 18:30:45 +02:00
Geoffroy Couprie
219fab0b53 remove some warnings 2017-05-11 17:24:52 +02:00
Geoffroy Couprie
6c15cc24f1 fix type inference in regex combinators 2017-05-11 13:54:34 +02:00
Geoffroy Couprie
df5629ea1b Fix type inference in count 2017-05-09 16:17:50 +02:00
Geoffroy Couprie
7eb8c712aa fix a few more sources of type inference errors 2017-05-09 16:10:53 +02:00
Geoffroy Couprie
d8dde827e6 Replace the core feature by a std feature activated by default
compilation features are additive, so a 'core' that removes some
functionality makes no sense. To use nom in no_std environment,
the code should nom import nom and deactivate 'std'
2017-05-09 13:00:21 +02:00
Marc-Antoine Perennou
9753dad047 tests/issues: don't use chain!
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-10-22 15:23:58 +02:00
Geoffroy Couprie
7ee5d15e2d digit, alpha and others must return Incomplete on empty input 2016-10-18 14:16:06 +02:00
Xirdus
98e706389a Fixed take_till! to be usable from the outside of nom crate 2016-04-11 23:59:50 +02:00
Guillaume Gomez
21cadf42c8 Fix length_bytes usize issue 2016-03-28 10:07:03 +02:00
Geoffroy Couprie
f255e2e71d Fix some issues in argument parsing for switch! 2015-12-31 13:23:09 +01:00
Geoffroy Couprie
2eddc3d94b alpha, digit and others should not accept empty input 2015-12-30 16:24:10 +01:00
Geoffroy Couprie
5fb0d131f6 support tests on stable 2015-09-09 01:28:17 +02:00
Geoffroy Couprie
62908a2a98 add missing test file 2015-08-04 09:07:55 +02:00