aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/string_lexing
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/string_lexing')
-rw-r--r--crates/ra_syntax/src/string_lexing/mod.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/crates/ra_syntax/src/string_lexing/mod.rs b/crates/ra_syntax/src/string_lexing/mod.rs
index 6b52c62c3..f0812ff28 100644
--- a/crates/ra_syntax/src/string_lexing/mod.rs
+++ b/crates/ra_syntax/src/string_lexing/mod.rs
@@ -100,10 +100,6 @@ impl<'a> Parser<'a> {
100 // Char parsing methods 100 // Char parsing methods
101 101
102 fn parse_unicode_escape(&mut self, start: TextUnit) -> CharComponent { 102 fn parse_unicode_escape(&mut self, start: TextUnit) -> CharComponent {
103 // Note: validation of UnicodeEscape will be done elsewhere:
104 // * Only hex digits or underscores allowed
105 // * Max 6 chars
106 // * Within allowed range (must be at most 10FFFF)
107 match self.peek() { 103 match self.peek() {
108 Some('{') => { 104 Some('{') => {
109 self.advance(); 105 self.advance();
@@ -127,9 +123,6 @@ impl<'a> Parser<'a> {
127 } 123 }
128 124
129 fn parse_ascii_code_escape(&mut self, start: TextUnit) -> CharComponent { 125 fn parse_ascii_code_escape(&mut self, start: TextUnit) -> CharComponent {
130 // Note: validation of AsciiCodeEscape will be done elsewhere:
131 // * First digit is octal
132 // * Second digit is hex
133 let code_start = self.get_pos(); 126 let code_start = self.get_pos();
134 while let Some(next) = self.peek() { 127 while let Some(next) = self.peek() {
135 if next == '\'' || (self.get_pos() - code_start == 2.into()) { 128 if next == '\'' || (self.get_pos() - code_start == 2.into()) {
@@ -144,9 +137,6 @@ impl<'a> Parser<'a> {
144 } 137 }
145 138
146 fn parse_escape(&mut self, start: TextUnit) -> CharComponent { 139 fn parse_escape(&mut self, start: TextUnit) -> CharComponent {
147 // Note: validation of AsciiEscape will be done elsewhere:
148 // * The escape sequence is non-empty
149 // * The escape sequence is valid
150 if self.peek().is_none() { 140 if self.peek().is_none() {
151 return CharComponent::new(TextRange::from_to(start, start), AsciiEscape); 141 return CharComponent::new(TextRange::from_to(start, start), AsciiEscape);
152 } 142 }