Attach TokenStream
to ast::Visibility
A `Visibility` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
This commit is contained in:
parent
55082ce413
commit
c1011165e6
22 changed files with 120 additions and 50 deletions
|
@ -2490,7 +2490,12 @@ pub enum CrateSugar {
|
|||
JustCrate,
|
||||
}
|
||||
|
||||
pub type Visibility = Spanned<VisibilityKind>;
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub struct Visibility {
|
||||
pub kind: VisibilityKind,
|
||||
pub span: Span,
|
||||
pub tokens: Option<TokenStream>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub enum VisibilityKind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue