#syn #macros

syn-mid

Providing the features between “full” and “derive” of syn

5 releases (3 breaking)

new 0.5.1 Oct 14, 2020
0.5.0 Dec 9, 2019
0.4.0 Aug 15, 2019
0.3.0 Feb 17, 2019
0.1.0 Feb 14, 2019

#15 in Procedural macros

Download history 89243/week @ 2020-06-28 92549/week @ 2020-07-05 90358/week @ 2020-07-12 91444/week @ 2020-07-19 93607/week @ 2020-07-26 68441/week @ 2020-08-02 53915/week @ 2020-08-09 54005/week @ 2020-08-16 49032/week @ 2020-08-23 42605/week @ 2020-08-30 39969/week @ 2020-09-06 38555/week @ 2020-09-13 31995/week @ 2020-09-20 31123/week @ 2020-09-27 30316/week @ 2020-10-04 30077/week @ 2020-10-11

220,921 downloads per month
Used in 33 crates (2 directly)

Apache-2.0 OR MIT

32KB
719 lines

syn-mid

crates-badge docs-badge license-badge rustc-badge

Providing the features between "full" and "derive" of syn.

This crate provides the following two unique data structures.

  • syn_mid::ItemFn -- A function whose body is not parsed.

    fn process(n: usize) -> Result<()> { ... }
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^     ^
    
  • syn_mid::Block -- A block whose body is not parsed.

    { ... }
    ^     ^
    

Other data structures are the same as data structures of syn. These are defined in this crate because they cannot be used in syn without "full" feature.

Usage

Add this to your Cargo.toml:

[dependencies]
syn-mid = "0.5"

The current syn-mid requires Rust 1.31 or later.

Examples

Optional features

  • clone-impls — Clone impls for all syntax tree types.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.4–0.8MB
~21K SLoC