diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 09:05:55 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-08 09:05:55 +0000 |
commit | 3f4be819125ce4a22edd86721fa56b5caba99c2e (patch) | |
tree | be93895ddc08c911585d9f7bc64623a3741f32c6 /crates/ra_syntax/src/validation.rs | |
parent | 4e444d2bc24d16284401444fd2154f63e0f96070 (diff) | |
parent | 122410d7aa34a32d468a3173858cbc8a2bbc68f5 (diff) |
Merge #449
449: switch to new rowan API r=matklad a=matklad
closes https://github.com/rust-analyzer/rust-analyzer/issues/448
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/validation.rs')
-rw-r--r-- | crates/ra_syntax/src/validation.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index bdee8120c..73e1d20b9 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -1,16 +1,15 @@ | |||
1 | use crate::{ | ||
2 | algo::visit::{visitor_ctx, VisitorCtx}, | ||
3 | ast, | ||
4 | SourceFileNode, | ||
5 | yellow::SyntaxError, | ||
6 | }; | ||
7 | |||
8 | mod byte; | 1 | mod byte; |
9 | mod byte_string; | 2 | mod byte_string; |
10 | mod char; | 3 | mod char; |
11 | mod string; | 4 | mod string; |
12 | 5 | ||
13 | pub(crate) fn validate(file: &SourceFileNode) -> Vec<SyntaxError> { | 6 | use crate::{ |
7 | SourceFile, yellow::SyntaxError, AstNode, | ||
8 | ast, | ||
9 | algo::visit::{visitor_ctx, VisitorCtx}, | ||
10 | }; | ||
11 | |||
12 | pub(crate) fn validate(file: &SourceFile) -> Vec<SyntaxError> { | ||
14 | let mut errors = Vec::new(); | 13 | let mut errors = Vec::new(); |
15 | for node in file.syntax().descendants() { | 14 | for node in file.syntax().descendants() { |
16 | let _ = visitor_ctx(&mut errors) | 15 | let _ = visitor_ctx(&mut errors) |