diff options
author | Aleksey Kladov <[email protected]> | 2018-08-09 19:27:44 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-09 19:27:44 +0100 |
commit | 4a900fd6815d3ea722b5e664aee9eac8bb9cb14f (patch) | |
tree | 48dddd52ed4ed5e9cf28504d2c3b8d8a1dd8c27e /src/ast | |
parent | afa94d4f37b9a0a1e723edffcc79c3d48799bad1 (diff) |
Split diagnostics
Diffstat (limited to 'src/ast')
-rw-r--r-- | src/ast/mod.rs | 6 |
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 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | use { | 4 | use { |
5 | SyntaxNode, SyntaxRoot, TreeRoot, | 5 | SyntaxNode, SyntaxRoot, TreeRoot, SyntaxError, |
6 | SyntaxKind::*, | 6 | SyntaxKind::*, |
7 | }; | 7 | }; |
8 | pub use self::generated::*; | 8 | pub use self::generated::*; |
@@ -19,6 +19,10 @@ impl File<Arc<SyntaxRoot>> { | |||
19 | } | 19 | } |
20 | 20 | ||
21 | impl<R: TreeRoot> File<R> { | 21 | impl<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() |