Minor fallout/update FOLLOW sets
This commit is contained in:
parent
ac8e10519a
commit
bd4119f965
@ -186,12 +186,12 @@ macro_rules! write {
|
||||
#[macro_export]
|
||||
#[stable]
|
||||
macro_rules! writeln {
|
||||
($dst:expr, $fmt:expr, $($arg:tt)*) => (
|
||||
write!($dst, concat!($fmt, "\n") $($arg)*)
|
||||
);
|
||||
($dst:expr, $fmt:expr) => (
|
||||
write!($dst, concat!($fmt, "\n"))
|
||||
)
|
||||
);
|
||||
($dst:expr, $fmt:expr, $($arg:expr),*) => (
|
||||
write!($dst, concat!($fmt, "\n"), $($arg,)*)
|
||||
);
|
||||
}
|
||||
|
||||
/// A utility macro for indicating unreachable code.
|
||||
|
@ -14,16 +14,24 @@
|
||||
//! they aren't defined anywhere outside of the `rt` module.
|
||||
|
||||
macro_rules! rterrln {
|
||||
($fmt:expr $($arg:tt)*) => ( {
|
||||
::rt::util::dumb_print(format_args!(concat!($fmt, "\n") $($arg)*))
|
||||
($fmt:expr) => ( {
|
||||
::rt::util::dumb_print(format_args!(concat!($fmt, "\n")))
|
||||
} );
|
||||
($fmt:expr, $($arg:expr),*) => ( {
|
||||
::rt::util::dumb_print(format_args!(concat!($fmt, "\n"), $($arg)*))
|
||||
} )
|
||||
}
|
||||
|
||||
// Some basic logging. Enabled by passing `--cfg rtdebug` to the libstd build.
|
||||
macro_rules! rtdebug {
|
||||
($($arg:tt)*) => ( {
|
||||
($arg:expr) => ( {
|
||||
if cfg!(rtdebug) {
|
||||
rterrln!($($arg)*)
|
||||
rterrln!($arg)
|
||||
}
|
||||
} );
|
||||
($str:expr, $($arg:expr),*) => ( {
|
||||
if cfg!(rtdebug) {
|
||||
rterrln!($str, $($arg)*)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ fn is_in_follow(cx: &ExtCtxt, tok: &Token, frag: &str) -> bool {
|
||||
},
|
||||
"stmt" | "expr" => {
|
||||
match *tok {
|
||||
Comma | Semi => true,
|
||||
FatArrow | Comma | Semi => true,
|
||||
_ => false
|
||||
}
|
||||
},
|
||||
@ -434,7 +434,7 @@ fn is_in_follow(cx: &ExtCtxt, tok: &Token, frag: &str) -> bool {
|
||||
},
|
||||
"path" | "ty" => {
|
||||
match *tok {
|
||||
Comma | RArrow | Colon | Eq | Gt => true,
|
||||
Comma | FatArrow | Colon | Eq | Gt => true,
|
||||
Ident(i, _) if i.as_str() == "as" => true,
|
||||
_ => false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user