27: Update to nom 6.x r=emilio a=tweksteen
This is an upgrade to nom 6.x. It was tested via `cargo test`. @jethrogb Could you please review? Could you please also consider adding @emilio as maintainer (see #23)? Thanks.
Old obsolete message:
> This is an attempt at upgrading to nom 6.x. There is still an issue in `typed_token` about the expected lifetime of the input. @jonhoo, since you did the port to nom 5.x, you may have some insight on how to fix this.
@jethrogb, any feedback is appreciated. Thanks.
Bug: #26
Co-authored-by: Thiébaud Weksteen <tweek@google.com>
24: Only use needed features from nom r=jethrogb a=jrmuizel
Most importantly stop depending on the large lexical-core dependency.
This reduces clean build by about 3 seconds
Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
22: Upgrade to nom 5 r=jethrogb a=jonhoo
This patchset builds on #21, and bumps the dependency on `nom` to version 5. The change is a fairly major one, since `nom` moved away from macro-based parsers to combinators based on function callbacks.
Fixes#19
---
**Old obsolete text:**
The current state of affairs is that this _almost_ compiles. The biggest remaining issue is how to pass the methods of `expr::PRef` in the new function-passing style. The errors should pretty quickly make it obvious what's going on. I'm honestly not sure what the right way to go about this is. The methods that call them may need to be re-written in the sort of "linear" style that `nom 5` favors. [`nom-methods`](https://docs.rs/nom-methods/) may provide some inspiration here. The new `&mut self` style also makes it awkward to have a combinator that may call multiple different methods on `self`. It may be that we want to return to the old "consume self return Self" strategy to get around this.
I don't know that I'll have the time to finish this PR up any time soon, so @jethrogb if you want to pick this up and run with it, feel free!
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/jethrogb/rust-cexpr/22)
<!-- Reviewable:end -->
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
21: rustfmt + 2018 edition + 2018 idioms r=jethrogb a=jonhoo
I _think_ this can replace #20 as it also does `rustfmt` and `rust_2018_idioms`.
Fixes#20
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
17: Support capital integer literal prefixes (0X, 0B) r=jethrogb a=ikravets
From C/C++ standard standpoint capital 0X prefix is valid at least from C99 and capital 0B prefix is valid starting C++14. This PR adds basic tests and fixes both cases.
Co-authored-by: Ilia Kravets <ilia.kravets@gmail.com>