parent
8cb6bc3b5a
commit
9c4f3dbd06
2 changed files with 1 additions and 3 deletions
|
@ -699,8 +699,7 @@ impl Token {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Would `maybe_whole_expr` in `parser.rs` return `Ok(..)`?
|
/// Is this a pre-parsed expression dropped into the token stream
|
||||||
/// That is, is this a pre-parsed expression dropped into the token stream
|
|
||||||
/// (which happens while parsing the result of macro expansion)?
|
/// (which happens while parsing the result of macro expansion)?
|
||||||
pub fn is_whole_expr(&self) -> bool {
|
pub fn is_whole_expr(&self) -> bool {
|
||||||
if let Interpolated(nt) = &self.kind
|
if let Interpolated(nt) = &self.kind
|
||||||
|
|
|
@ -101,7 +101,6 @@ pub enum TrailingToken {
|
||||||
MaybeComma,
|
MaybeComma,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Like `maybe_whole_expr`, but for things other than expressions.
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! maybe_whole {
|
macro_rules! maybe_whole {
|
||||||
($p:expr, $constructor:ident, |$x:ident| $e:expr) => {
|
($p:expr, $constructor:ident, |$x:ident| $e:expr) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue