diff options
author | Aleksey Kladov <[email protected]> | 2018-09-01 10:30:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-01 10:30:53 +0100 |
commit | 2161a1689d53be4c4c5ab9353735975e9949fb02 (patch) | |
tree | fb68f0f0a8346b80e0d576db9d447e7c841fd709 /crates/libsyntax2/src | |
parent | f2772e29aeda5e35c282f3b023ce9d470f3fb441 (diff) |
Type aliases to scope
Diffstat (limited to 'crates/libsyntax2/src')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 3 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar.ron | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 50dc41b27..f21e49437 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -947,6 +947,7 @@ pub enum ModuleItem<'a> { | |||
947 | EnumDef(EnumDef<'a>), | 947 | EnumDef(EnumDef<'a>), |
948 | FnDef(FnDef<'a>), | 948 | FnDef(FnDef<'a>), |
949 | TraitDef(TraitDef<'a>), | 949 | TraitDef(TraitDef<'a>), |
950 | TypeDef(TypeDef<'a>), | ||
950 | ImplItem(ImplItem<'a>), | 951 | ImplItem(ImplItem<'a>), |
951 | UseItem(UseItem<'a>), | 952 | UseItem(UseItem<'a>), |
952 | ExternCrateItem(ExternCrateItem<'a>), | 953 | ExternCrateItem(ExternCrateItem<'a>), |
@@ -962,6 +963,7 @@ impl<'a> AstNode<'a> for ModuleItem<'a> { | |||
962 | ENUM_DEF => Some(ModuleItem::EnumDef(EnumDef { syntax })), | 963 | ENUM_DEF => Some(ModuleItem::EnumDef(EnumDef { syntax })), |
963 | FN_DEF => Some(ModuleItem::FnDef(FnDef { syntax })), | 964 | FN_DEF => Some(ModuleItem::FnDef(FnDef { syntax })), |
964 | TRAIT_DEF => Some(ModuleItem::TraitDef(TraitDef { syntax })), | 965 | TRAIT_DEF => Some(ModuleItem::TraitDef(TraitDef { syntax })), |
966 | TYPE_DEF => Some(ModuleItem::TypeDef(TypeDef { syntax })), | ||
965 | IMPL_ITEM => Some(ModuleItem::ImplItem(ImplItem { syntax })), | 967 | IMPL_ITEM => Some(ModuleItem::ImplItem(ImplItem { syntax })), |
966 | USE_ITEM => Some(ModuleItem::UseItem(UseItem { syntax })), | 968 | USE_ITEM => Some(ModuleItem::UseItem(UseItem { syntax })), |
967 | EXTERN_CRATE_ITEM => Some(ModuleItem::ExternCrateItem(ExternCrateItem { syntax })), | 969 | EXTERN_CRATE_ITEM => Some(ModuleItem::ExternCrateItem(ExternCrateItem { syntax })), |
@@ -977,6 +979,7 @@ impl<'a> AstNode<'a> for ModuleItem<'a> { | |||
977 | ModuleItem::EnumDef(inner) => inner.syntax(), | 979 | ModuleItem::EnumDef(inner) => inner.syntax(), |
978 | ModuleItem::FnDef(inner) => inner.syntax(), | 980 | ModuleItem::FnDef(inner) => inner.syntax(), |
979 | ModuleItem::TraitDef(inner) => inner.syntax(), | 981 | ModuleItem::TraitDef(inner) => inner.syntax(), |
982 | ModuleItem::TypeDef(inner) => inner.syntax(), | ||
980 | ModuleItem::ImplItem(inner) => inner.syntax(), | 983 | ModuleItem::ImplItem(inner) => inner.syntax(), |
981 | ModuleItem::UseItem(inner) => inner.syntax(), | 984 | ModuleItem::UseItem(inner) => inner.syntax(), |
982 | ModuleItem::ExternCrateItem(inner) => inner.syntax(), | 985 | ModuleItem::ExternCrateItem(inner) => inner.syntax(), |
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index 522521229..fbe8397d8 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron | |||
@@ -332,7 +332,7 @@ Grammar( | |||
332 | ], | 332 | ], |
333 | ), | 333 | ), |
334 | "ModuleItem": ( | 334 | "ModuleItem": ( |
335 | enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "ImplItem", | 335 | enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "TypeDef", "ImplItem", |
336 | "UseItem", "ExternCrateItem", "ConstDef", "StaticDef", "Module" ] | 336 | "UseItem", "ExternCrateItem", "ConstDef", "StaticDef", "Module" ] |
337 | ), | 337 | ), |
338 | 338 | ||