#fork #temporary #syn #futures-await #time #removing #synom

futures-await-synom

Temporary fork of synom for the futures-await crate

1 unstable release

Uses old Rust 2015

0.12.0 Oct 28, 2017

#2 in #futures-await

Download history 49/week @ 2024-03-11 53/week @ 2024-03-18 59/week @ 2024-03-25 92/week @ 2024-04-01 41/week @ 2024-04-08 58/week @ 2024-04-15 59/week @ 2024-04-22 49/week @ 2024-04-29 49/week @ 2024-05-06 48/week @ 2024-05-13 50/week @ 2024-05-20 43/week @ 2024-05-27 42/week @ 2024-06-03 30/week @ 2024-06-10 43/week @ 2024-06-17 49/week @ 2024-06-24

169 downloads per month
Used in futures-await-syn

MIT/Apache

68KB
1.5K SLoC

futures-await-syn

This crate is a temporary fork of dtolnay/syn. The syn repository isn't ready for publication yet but we'd like to publish the futures-await crate. This is a temporary fork that will only be maintained for the futures-await crate and it will be unmaintained as soon as syn is published upstream.

License

Licensed under either of

at your option.


lib.rs:

Adapted from nom by removing the IPResult::Incomplete variant which:

  • we don't need,
  • is an unintuitive footgun when working with non-streaming use cases, and
  • more than doubles compilation time.

Whitespace handling strategy

As (sy)nom is a parser combinator library, the parsers provided here and that you implement yourself are all made up of successively more primitive parsers, eventually culminating in a small number of fundamental parsers that are implemented in Rust. Among these are punct! and keyword!.

All synom fundamental parsers (those not combined out of other parsers) should be written to skip over leading whitespace in their input. This way, as long as every parser eventually boils down to some combination of fundamental parsers, we get correct whitespace handling at all levels for free.

For our use case, this strategy is a huge improvement in usability, correctness, and compile time over nom's ws! strategy.

Dependencies

~230KB