mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Allow ,
to delimit macro 2.0 rules
This commit is contained in:
parent
eb264fb819
commit
eaffdae300
3 changed files with 30 additions and 2 deletions
|
@ -220,9 +220,11 @@ impl MacroDef {
|
|||
while src.len() > 0 {
|
||||
let rule = Rule::parse(&mut src, true)?;
|
||||
rules.push(rule);
|
||||
if let Err(()) = src.expect_char(';') {
|
||||
if let Err(()) = src.expect_any_char(&[';', ',']) {
|
||||
if src.len() > 0 {
|
||||
return Err(ParseError::Expected("expected `;`".to_string()));
|
||||
return Err(ParseError::Expected(
|
||||
"expected `;` or `,` to delimit rules".to_string(),
|
||||
));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue