aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 09:05:55 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-08 09:05:55 +0000
commit3f4be819125ce4a22edd86721fa56b5caba99c2e (patch)
treebe93895ddc08c911585d9f7bc64623a3741f32c6 /crates/ra_syntax/src/validation.rs
parent4e444d2bc24d16284401444fd2154f63e0f96070 (diff)
parent122410d7aa34a32d468a3173858cbc8a2bbc68f5 (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.rs15
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 @@
1use crate::{
2 algo::visit::{visitor_ctx, VisitorCtx},
3 ast,
4 SourceFileNode,
5 yellow::SyntaxError,
6};
7
8mod byte; 1mod byte;
9mod byte_string; 2mod byte_string;
10mod char; 3mod char;
11mod string; 4mod string;
12 5
13pub(crate) fn validate(file: &SourceFileNode) -> Vec<SyntaxError> { 6use crate::{
7 SourceFile, yellow::SyntaxError, AstNode,
8 ast,
9 algo::visit::{visitor_ctx, VisitorCtx},
10};
11
12pub(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)