aboutsummaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-09 19:27:44 +0100
committerAleksey Kladov <[email protected]>2018-08-09 19:27:44 +0100
commit4a900fd6815d3ea722b5e664aee9eac8bb9cb14f (patch)
tree48dddd52ed4ed5e9cf28504d2c3b8d8a1dd8c27e /src/ast
parentafa94d4f37b9a0a1e723edffcc79c3d48799bad1 (diff)
Split diagnostics
Diffstat (limited to 'src/ast')
-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()