aboutsummaryrefslogtreecommitdiff
path: root/src/ast/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/mod.rs')
-rw-r--r--src/ast/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ast/mod.rs b/src/ast/mod.rs
index 317ed4f45..eeb7ae6f6 100644
--- a/src/ast/mod.rs
+++ b/src/ast/mod.rs
@@ -2,7 +2,7 @@ mod generated;
2 2
3use std::sync::Arc; 3use std::sync::Arc;
4use { 4use {
5 SyntaxNode, SyntaxRoot, TreeRoot, 5 SyntaxNode, SyntaxRoot, TreeRoot, SyntaxError,
6 SyntaxKind::*, 6 SyntaxKind::*,
7}; 7};
8pub use self::generated::*; 8pub use self::generated::*;
@@ -19,6 +19,10 @@ impl File<Arc<SyntaxRoot>> {
19} 19}
20 20
21impl<R: TreeRoot> File<R> { 21impl<R: TreeRoot> File<R> {
22 pub fn errors(&self) -> Vec<SyntaxError> {
23 self.syntax().root.errors.clone()
24 }
25
22 pub fn functions<'a>(&'a self) -> impl Iterator<Item = Function<R>> + 'a { 26 pub fn functions<'a>(&'a self) -> impl Iterator<Item = Function<R>> + 'a {
23 self.syntax() 27 self.syntax()
24 .children() 28 .children()