Releases: dtolnay/syn
Releases · dtolnay/syn
0.10.3
0.10.2
0.10.1
0.10.0
Significant new features
Lots of minor enhancements
- More efficient implementation of
Generics::split_for_impl
- Support for out-of-line modules i.e.
mod foo;
in addition tomod foo { ... }
From
impls for constructing the variousLit
variants (#50, thanks @killercup)- Parsing of raw byte strings
- Parsing of floating-point literals
- Parsing of integer literals containing underscores for visual alignment
- Parsing of hex, octal, and binary integer literals
- More restrictive parsing of variable names
- Nicer output for string literals containing the zero byte
\0
- Parsing of doc comments inside of macro invocations
- Parsing of const trait and impl methods
- Parsing of bare function types containing lifetimes
- Parsing of module inner attributes
- Parsing of hex escapes greater than
\x7F
in byte strings and byte literals - Parsing of trailing commas in a
match
expression - Parsing of slice patterns
- Parsing of unsafety and ABI associated with a bare function type
- Parsing of variadic extern functions
- Parsing of negative integer literal patterns
- Parsing of inner attributes within functions and methods
- Parsing of trailing commas in
use
declarations - Parsing of attributes on statements
- Parsing of
where
clauses on type aliases - Parsing of left-to-right mark and right-to-left mark codepoints
- Parsing of placement syntax
- Parsing of shebang at the top of a file
- Parsing of shorthand syntax within struct literal expressions
- Parsing of trailing commas inside generics
- Parsing of carriage returns in multiline string literals
- Parsing of
pub(crate)
andpub(restricted)
visibility modifiers - Parsing of byte order marks
- Parsing of trailing commas in slice patterns
0.10.0-rc1
Release 0.10.0-rc1
0.9.2
- Add
syn::parse_token_trees
to parse tokens from a string. Token trees are much simpler than an AST. This makes them easier to work with when they are sufficient for the task at hand, such as for example expanding a function-like macro. (#52, thanks @SimonSapin)
0.9.1
0.9.0
- Enum discriminant values and array lengths now support expressions instead of just usize literals (#31).
- Update
quote
dependency to 0.3. Make sure to check those release notes for an important update affecting repetitions. - Lots of progress on parsing Rust syntax beyond structs and enums (#4).
0.8.7
- Add
Generics::split_for_impl
which simplifies the handling of complex generic type signatures in a trait impl.
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
quote! {
impl #impl_generics MyTrait for #name #ty_generics #where_clause {
// ...
}
}