Fill in some missing parts in the default AST visitor
+ Add helper macro for walking lists (including Options)
This commit is contained in:
parent
9e11845d77
commit
eedb95101b
7 changed files with 272 additions and 354 deletions
|
|
@ -1613,6 +1613,13 @@ impl PathListItem_ {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<Ident> {
|
||||
match *self {
|
||||
PathListIdent { name, .. } => Some(name),
|
||||
PathListMod { .. } => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn rename(&self) -> Option<Ident> {
|
||||
match *self {
|
||||
PathListIdent { rename, .. } | PathListMod { rename, .. } => rename
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue