aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation/char.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/validation/char.rs')
-rw-r--r--crates/ra_syntax/src/validation/char.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs
index 4728c85e6..deb5b0a9e 100644
--- a/crates/ra_syntax/src/validation/char.rs
+++ b/crates/ra_syntax/src/validation/char.rs
@@ -6,7 +6,7 @@ use arrayvec::ArrayString;
6 6
7use crate::{ 7use crate::{
8 ast::{self, AstNode}, 8 ast::{self, AstNode},
9 string_lexing::{self, CharComponentKind}, 9 string_lexing::{self, StringComponentKind},
10 TextRange, 10 TextRange,
11 yellow::{ 11 yellow::{
12 SyntaxError, 12 SyntaxError,
@@ -41,12 +41,12 @@ pub(super) fn validate_char_node(node: ast::Char, errors: &mut Vec<SyntaxError>)
41 41
42pub(super) fn validate_char_component( 42pub(super) fn validate_char_component(
43 text: &str, 43 text: &str,
44 kind: CharComponentKind, 44 kind: StringComponentKind,
45 range: TextRange, 45 range: TextRange,
46 errors: &mut Vec<SyntaxError>, 46 errors: &mut Vec<SyntaxError>,
47) { 47) {
48 // Validate escapes 48 // Validate escapes
49 use self::CharComponentKind::*; 49 use self::StringComponentKind::*;
50 match kind { 50 match kind {
51 AsciiEscape => validate_ascii_escape(text, range, errors), 51 AsciiEscape => validate_ascii_escape(text, range, errors),
52 AsciiCodeEscape => validate_ascii_code_escape(text, range, errors), 52 AsciiCodeEscape => validate_ascii_code_escape(text, range, errors),
@@ -57,6 +57,7 @@ pub(super) fn validate_char_component(
57 errors.push(SyntaxError::new(UnescapedCodepoint, range)); 57 errors.push(SyntaxError::new(UnescapedCodepoint, range));
58 } 58 }
59 } 59 }
60 StringComponentKind::IgnoreNewline => { /* always valid */ }
60 } 61 }
61} 62}
62 63