syntax: Use ast::MacArgs
for macro definitions
This commit is contained in:
parent
1a496f3379
commit
537895535d
9 changed files with 37 additions and 42 deletions
|
@ -1474,17 +1474,11 @@ impl MacDelimiter {
|
|||
/// Represents a macro definition.
|
||||
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
|
||||
pub struct MacroDef {
|
||||
pub tokens: TokenStream,
|
||||
pub body: P<MacArgs>,
|
||||
/// `true` if macro was defined with `macro_rules`.
|
||||
pub legacy: bool,
|
||||
}
|
||||
|
||||
impl MacroDef {
|
||||
pub fn stream(&self) -> TokenStream {
|
||||
self.tokens.clone().into()
|
||||
}
|
||||
}
|
||||
|
||||
// Clippy uses Hash and PartialEq
|
||||
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq, HashStable_Generic)]
|
||||
pub enum StrStyle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue