This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Description
Now that Rust 1.39.0 supports attributes on parameters, the grammar should be updated to allow attributes when parsing function definitions.
Example:
#[attr(foo = "bar")]
fn foo(#[attr(foo = "bar")] p: u32) {
println!("hi");
}
Notice that "bar" is not highlighted as a string, which is an included pattern in the attribute grammar.
Additionally, parsing breaks when the attribute string has characters that are interpreted as Rust tokens:
#[attr(foo = "bar")]
fn foo(#[attr(foo = "{")] p: u32) {
println!("hi");
}
Note that here { is being matched as the opening bracket of the function, causing the closing " to be matched as the start of a string (the remainder of the function is considered to be in the string).