Skip to content

Releases: dtolnay/syn

0.12.2

12 Jan 01:15
0.12.2
3c4cbf6
Compare
Choose a tag to compare
  • Allow collecting an iterator of T into Punctuated<T, P> where P: Default

0.12.1

12 Jan 01:14
0.12.1
9a0961a
Compare
Choose a tag to compare
  • Allow indexing into a Punctuated using square brackets

0.12.0

12 Jan 01:14
0.12.0
152eb18
Compare
Choose a tag to compare
  • Rewrite to process Macros 2.0-style token streams rather than strings of source code. See the readme and release announcement.

0.11.11

20 Apr 17:16
0.11.11
2134cc2
Compare
Choose a tag to compare

0.11.10

20 Apr 17:14
0.11.10
90c07ea
Compare
Choose a tag to compare
  • Provide Ord and PartialOrd impls for Ident and Lifetime, allowing them to be used in a BTreeSet

0.11.9

06 Mar 16:47
0.11.9
5e42499
Compare
Choose a tag to compare
  • Expose syn::parse_inner_attr and syn::parse_outer_attr (#105, thanks @colin-kiegel)

0.11.8

06 Mar 16:46
0.11.8
01bb615
Compare
Choose a tag to compare
  • Parse any possible enum discriminant when using "full" feature (#98, thanks @SimonSapin)

0.11.7

06 Mar 16:44
0.11.7
f8ed9a9
Compare
Choose a tag to compare
  • Expose synom parsers for pat, block, stmt

0.11.6

19 Feb 21:10
0.11.6
2ce94ed
Compare
Choose a tag to compare
  • Drop Clippy dependency to break an import cycle of syn -> clippy -> cargo_metadata -> serde_derive -> syn causing trouble on docs.rs

0.11.5

19 Feb 21:05
0.11.5
b7defb7
Compare
Choose a tag to compare
  • Implement an AST folder, syn::fold::Folder (#85, thanks @gnzlbg)

  • Expose parsers and parser combinators for parsing custom function-like macro input

    extern crate syn;
    #[macro_use] extern crate synom;
    
    use syn::Expr;
    use syn::parse::expr;
    
    // An expression surrounded by [[ ... ]].
    named!(double_bracket_expr -> Expr,
        delimited!(punct!("[["), expr, punct!("]]"))
    );
    
    fn main() {
        let input = "[[ 1 + 1 ]]";
    
        let parsed = double_bracket_expr(input).expect("double bracket expr");
    
        println!("{:?}", parsed);
    }