Add AST for extern crate

Also change it to parse the crate name as a NAME_REF, not a NAME.
This commit is contained in:
Florian Diebold 2019-02-02 00:33:54 +01:00
parent 77a824c6a0
commit e163c908ac
5 changed files with 16 additions and 6 deletions

View file

@ -970,7 +970,15 @@ impl ToOwned for ExternCrateItem {
}
impl ExternCrateItem {}
impl ExternCrateItem {
pub fn name_ref(&self) -> Option<&NameRef> {
super::child_opt(self)
}
pub fn alias(&self) -> Option<&Alias> {
super::child_opt(self)
}
}
// FalseKw
#[derive(Debug, PartialEq, Eq, Hash)]