From ec706175645172ee4bd5d3d4c0645ffb45d79bbf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 23 Aug 2018 20:04:13 +0300 Subject: byte literals --- crates/libsyntax2/src/lexer/strings.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'crates/libsyntax2/src/lexer') diff --git a/crates/libsyntax2/src/lexer/strings.rs b/crates/libsyntax2/src/lexer/strings.rs index a6da97d47..e6ade54a4 100644 --- a/crates/libsyntax2/src/lexer/strings.rs +++ b/crates/libsyntax2/src/lexer/strings.rs @@ -102,23 +102,11 @@ pub(crate) fn scan_raw_string(ptr: &mut Ptr) { } fn scan_byte(ptr: &mut Ptr) { - if ptr.next_is('\'') { - ptr.bump(); - return; - } - ptr.bump(); - if ptr.next_is('\'') { - ptr.bump(); - return; - } + scan_char(ptr) } fn scan_byte_string(ptr: &mut Ptr) { - while let Some(c) = ptr.bump() { - if c == '"' { - return; - } - } + scan_string(ptr) } fn scan_raw_byte_string(ptr: &mut Ptr) { -- cgit v1.2.3