aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mbe/src/lib.rs')
-rw-r--r--crates/mbe/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs
index e74f8cf3f..3af5bc18b 100644
--- a/crates/mbe/src/lib.rs
+++ b/crates/mbe/src/lib.rs
@@ -220,9 +220,11 @@ impl MacroDef {
220 while src.len() > 0 { 220 while src.len() > 0 {
221 let rule = Rule::parse(&mut src, true)?; 221 let rule = Rule::parse(&mut src, true)?;
222 rules.push(rule); 222 rules.push(rule);
223 if let Err(()) = src.expect_char(';') { 223 if let Err(()) = src.expect_any_char(&[';', ',']) {
224 if src.len() > 0 { 224 if src.len() > 0 {
225 return Err(ParseError::Expected("expected `;`".to_string())); 225 return Err(ParseError::Expected(
226 "expected `;` or `,` to delimit rules".to_string(),
227 ));
226 } 228 }
227 break; 229 break;
228 } 230 }