Fix type inference for raw (byte) strings

This commit is contained in:
Marcus Klaas de Vries 2019-01-14 20:56:14 +01:00
parent 2689348772
commit d67eabb512
7 changed files with 119 additions and 65 deletions

View file

@ -49,7 +49,7 @@ pub(crate) fn scan_byte_char_or_string(ptr: &mut Ptr) -> SyntaxKind {
BYTE_STRING
}
'r' => {
scan_raw_byte_string(ptr);
scan_raw_string(ptr);
RAW_BYTE_STRING
}
_ => unreachable!(),
@ -108,16 +108,3 @@ fn scan_byte(ptr: &mut Ptr) {
fn scan_byte_string(ptr: &mut Ptr) {
scan_string(ptr)
}
fn scan_raw_byte_string(ptr: &mut Ptr) {
if !ptr.at('"') {
return;
}
ptr.bump();
while let Some(c) = ptr.bump() {
if c == '"' {
return;
}
}
}