diff options
Diffstat (limited to 'crates/ra_syntax/src/validation/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/validation/mod.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/ra_syntax/src/validation/mod.rs b/crates/ra_syntax/src/validation/mod.rs deleted file mode 100644 index bdee8120c..000000000 --- a/crates/ra_syntax/src/validation/mod.rs +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | use crate::{ | ||
2 | algo::visit::{visitor_ctx, VisitorCtx}, | ||
3 | ast, | ||
4 | SourceFileNode, | ||
5 | yellow::SyntaxError, | ||
6 | }; | ||
7 | |||
8 | mod byte; | ||
9 | mod byte_string; | ||
10 | mod char; | ||
11 | mod string; | ||
12 | |||
13 | pub(crate) fn validate(file: &SourceFileNode) -> Vec<SyntaxError> { | ||
14 | let mut errors = Vec::new(); | ||
15 | for node in file.syntax().descendants() { | ||
16 | let _ = visitor_ctx(&mut errors) | ||
17 | .visit::<ast::Byte, _>(self::byte::validate_byte_node) | ||
18 | .visit::<ast::ByteString, _>(self::byte_string::validate_byte_string_node) | ||
19 | .visit::<ast::Char, _>(self::char::validate_char_node) | ||
20 | .visit::<ast::String, _>(self::string::validate_string_node) | ||
21 | .accept(node); | ||
22 | } | ||
23 | errors | ||
24 | } | ||