The docs say #[parse_terminated] takes no arguments, but attempting to use it gives the error:
expected parenthesis in `#[parse_terminated(...)]`
Example:
mod kw {
syn::custom_keyword!(nop);
}
#[derive(Parse)]
pub struct Program {
#[parse_terminated]
instructions: Punctuated<Instruction, Token![,]>,
}
#[derive(Parse)]
pub enum Instruction {
#[peek(kw::nop, name = "nop")]
Nop,
}
The docs say
#[parse_terminated]takes no arguments, but attempting to use it gives the error:expected parenthesis in `#[parse_terminated(...)]`Example: