complete items from module scope

This commit is contained in:
Aleksey Kladov 2018-08-28 19:23:55 +03:00
parent d34588bf83
commit 537ea620bb
6 changed files with 100 additions and 18 deletions

View file

@ -1441,6 +1441,10 @@ impl<'a> AstNode<'a> for Root<'a> {
}
impl<'a> Root<'a> {
pub fn items(self) -> impl Iterator<Item = ModuleItem<'a>> + 'a {
super::children(self)
}
pub fn functions(self) -> impl Iterator<Item = FnDef<'a>> + 'a {
super::children(self)
}