parse empty statemet as statemetn

This commit is contained in:
Aleksey Kladov 2021-12-29 20:04:36 +03:00
parent 841cd30b45
commit b5369927d7
4 changed files with 15 additions and 20 deletions

View file

@ -85,17 +85,21 @@ fn stmt_boundaries() {
check(
r#"
macro_rules! m {
($($s:stmt)*) => (stringify!($($s |)*))
($($s:stmt)*) => (stringify!($($s |)*);)
}
// +errors
m!(;;92;let x = 92; loop {};);
"#,
expect![[r#"
macro_rules! m {
($($s:stmt)*) => (stringify!($($s |)*))
($($s:stmt)*) => (stringify!($($s |)*);)
}
/* error: expected Stmt *//* parse error: expected SEMICOLON */
stringify!()
stringify!(;
|;
|92|;
|let x = 92|;
|loop {}
|;
|);
"#]],
);
}