diff options
author | Aleksey Kladov <[email protected]> | 2019-01-07 13:15:47 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-08 08:20:15 +0000 |
commit | d91a98ec843ec8562c58ccb01a1e29d00cc744dc (patch) | |
tree | c628b6afbbe2e3a31ea88e6c16f556309dd0dde9 /crates/ra_syntax/src/validation/char.rs | |
parent | 55272f2023e69f3eff727ecbf77078e1b45e7f86 (diff) |
switch ra_syntax to new rowan API
Diffstat (limited to 'crates/ra_syntax/src/validation/char.rs')
-rw-r--r-- | crates/ra_syntax/src/validation/char.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs index 1d6fe8837..9cbd43fba 100644 --- a/crates/ra_syntax/src/validation/char.rs +++ b/crates/ra_syntax/src/validation/char.rs | |||
@@ -14,7 +14,7 @@ use crate::{ | |||
14 | }, | 14 | }, |
15 | }; | 15 | }; |
16 | 16 | ||
17 | pub(super) fn validate_char_node(node: ast::Char, errors: &mut Vec<SyntaxError>) { | 17 | pub(super) fn validate_char_node(node: &ast::Char, errors: &mut Vec<SyntaxError>) { |
18 | let literal_text = node.text(); | 18 | let literal_text = node.text(); |
19 | let literal_range = node.syntax().range(); | 19 | let literal_range = node.syntax().range(); |
20 | let mut components = string_lexing::parse_char_literal(literal_text); | 20 | let mut components = string_lexing::parse_char_literal(literal_text); |
@@ -175,11 +175,11 @@ fn validate_unicode_escape(text: &str, range: TextRange, errors: &mut Vec<Syntax | |||
175 | 175 | ||
176 | #[cfg(test)] | 176 | #[cfg(test)] |
177 | mod test { | 177 | mod test { |
178 | use crate::SourceFileNode; | 178 | use crate::{SourceFile, TreePtr}; |
179 | 179 | ||
180 | fn build_file(literal: &str) -> SourceFileNode { | 180 | fn build_file(literal: &str) -> TreePtr<SourceFile> { |
181 | let src = format!("const C: char = '{}';", literal); | 181 | let src = format!("const C: char = '{}';", literal); |
182 | SourceFileNode::parse(&src) | 182 | SourceFile::parse(&src) |
183 | } | 183 | } |
184 | 184 | ||
185 | fn assert_valid_char(literal: &str) { | 185 | fn assert_valid_char(literal: &str) { |