diff options
author | Florian Diebold <[email protected]> | 2019-02-01 23:33:54 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-02-04 20:49:34 +0000 |
commit | e163c908acff9260eff347541f0f3f57db551622 (patch) | |
tree | 1749bf4fa26b02d97d058c985083bd388ad71b91 /crates/ra_syntax/src/ast/generated.rs | |
parent | 77a824c6a0db6ac2548841d290d5d61d1d23295c (diff) |
Add AST for extern crate
Also change it to parse the crate name as a NAME_REF, not a NAME.
Diffstat (limited to 'crates/ra_syntax/src/ast/generated.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 60480c699..a8d60e882 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -970,7 +970,15 @@ impl ToOwned for ExternCrateItem { | |||
970 | } | 970 | } |
971 | 971 | ||
972 | 972 | ||
973 | impl ExternCrateItem {} | 973 | impl ExternCrateItem { |
974 | pub fn name_ref(&self) -> Option<&NameRef> { | ||
975 | super::child_opt(self) | ||
976 | } | ||
977 | |||
978 | pub fn alias(&self) -> Option<&Alias> { | ||
979 | super::child_opt(self) | ||
980 | } | ||
981 | } | ||
974 | 982 | ||
975 | // FalseKw | 983 | // FalseKw |
976 | #[derive(Debug, PartialEq, Eq, Hash)] | 984 | #[derive(Debug, PartialEq, Eq, Hash)] |