Allow trailing comma in macro 2.0 declarations.
This commit is contained in:
parent
9152fe4ea0
commit
cefbf4d7b5
1 changed files with 4 additions and 1 deletions
|
|
@ -282,7 +282,10 @@ pub fn compile(
|
|||
quoted::TokenTree::Sequence(
|
||||
DelimSpan::dummy(),
|
||||
Lrc::new(quoted::SequenceRepetition {
|
||||
tts: vec![quoted::TokenTree::token(token::Semi, def.span)],
|
||||
tts: vec![quoted::TokenTree::token(
|
||||
if body.legacy { token::Semi } else { token::Comma },
|
||||
def.span,
|
||||
)],
|
||||
separator: None,
|
||||
kleene: quoted::KleeneToken::new(quoted::KleeneOp::ZeroOrMore, def.span),
|
||||
num_captures: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue