diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-12 15:59:47 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-12 15:59:47 +0000 |
commit | 9aebd9e6caf49467ca20caf2583c47cf5092c788 (patch) | |
tree | 93c56d8301131a01de13b73010f615291eb1d6d4 /crates/ra_syntax/src/validation/mod.rs | |
parent | a4f7d7a7cd85a5b9b64a935dd84ad493b6860236 (diff) | |
parent | c96bfe7e2d4465653fe6b0eff053f0dfb48313fa (diff) |
Merge #226
226: Validate byte literals and byte strings r=aochagavia a=aochagavia
Co-authored-by: Adolfo OchagavĂa <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/validation/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/validation/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/validation/mod.rs b/crates/ra_syntax/src/validation/mod.rs index 2ff0bc26d..bdee8120c 100644 --- a/crates/ra_syntax/src/validation/mod.rs +++ b/crates/ra_syntax/src/validation/mod.rs | |||
@@ -5,6 +5,8 @@ use crate::{ | |||
5 | yellow::SyntaxError, | 5 | yellow::SyntaxError, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | mod byte; | ||
9 | mod byte_string; | ||
8 | mod char; | 10 | mod char; |
9 | mod string; | 11 | mod string; |
10 | 12 | ||
@@ -12,6 +14,8 @@ pub(crate) fn validate(file: &SourceFileNode) -> Vec<SyntaxError> { | |||
12 | let mut errors = Vec::new(); | 14 | let mut errors = Vec::new(); |
13 | for node in file.syntax().descendants() { | 15 | for node in file.syntax().descendants() { |
14 | let _ = visitor_ctx(&mut errors) | 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) | ||
15 | .visit::<ast::Char, _>(self::char::validate_char_node) | 19 | .visit::<ast::Char, _>(self::char::validate_char_node) |
16 | .visit::<ast::String, _>(self::string::validate_string_node) | 20 | .visit::<ast::String, _>(self::string::validate_string_node) |
17 | .accept(node); | 21 | .accept(node); |