aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-28 17:23:55 +0100
committerAleksey Kladov <[email protected]>2018-08-28 17:23:55 +0100
commit537ea620bb2a73a5e79872f414af23cf4bf03179 (patch)
tree875b5c789e027615be5466a74bf7053a6798da0d /crates/libsyntax2
parentd34588bf83898870d7f9b4b49ac2a5f71c77dabb (diff)
complete items from module scope
Diffstat (limited to 'crates/libsyntax2')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs4
-rw-r--r--crates/libsyntax2/src/grammar.ron1
2 files changed, 5 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs
index b24fd2aba..2b400b847 100644
--- a/crates/libsyntax2/src/ast/generated.rs
+++ b/crates/libsyntax2/src/ast/generated.rs
@@ -1441,6 +1441,10 @@ impl<'a> AstNode<'a> for Root<'a> {
1441} 1441}
1442 1442
1443impl<'a> Root<'a> { 1443impl<'a> Root<'a> {
1444 pub fn items(self) -> impl Iterator<Item = ModuleItem<'a>> + 'a {
1445 super::children(self)
1446 }
1447
1444 pub fn functions(self) -> impl Iterator<Item = FnDef<'a>> + 'a { 1448 pub fn functions(self) -> impl Iterator<Item = FnDef<'a>> + 'a {
1445 super::children(self) 1449 super::children(self)
1446 } 1450 }
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron
index c3a29c10c..8055a4687 100644
--- a/crates/libsyntax2/src/grammar.ron
+++ b/crates/libsyntax2/src/grammar.ron
@@ -238,6 +238,7 @@ Grammar(
238 ast: { 238 ast: {
239 "Root": ( 239 "Root": (
240 collections: [ 240 collections: [
241 ["items", "ModuleItem"],
241 ["functions", "FnDef"], 242 ["functions", "FnDef"],
242 ["modules", "Module"], 243 ["modules", "Module"],
243 ] 244 ]