diff options
author | Aleksey Kladov <[email protected]> | 2018-08-23 18:04:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-23 18:04:13 +0100 |
commit | ec706175645172ee4bd5d3d4c0645ffb45d79bbf (patch) | |
tree | 48fa60231036d7b1ff48b5e7b99bdc310f9f8f8b /crates/libsyntax2/src/lexer | |
parent | f3e1e6df4202a20fa75543f6847782be515dae06 (diff) |
byte literals
Diffstat (limited to 'crates/libsyntax2/src/lexer')
-rw-r--r-- | crates/libsyntax2/src/lexer/strings.rs | 16 |
1 files changed, 2 insertions, 14 deletions
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) { | |||
102 | } | 102 | } |
103 | 103 | ||
104 | fn scan_byte(ptr: &mut Ptr) { | 104 | fn scan_byte(ptr: &mut Ptr) { |
105 | if ptr.next_is('\'') { | 105 | scan_char(ptr) |
106 | ptr.bump(); | ||
107 | return; | ||
108 | } | ||
109 | ptr.bump(); | ||
110 | if ptr.next_is('\'') { | ||
111 | ptr.bump(); | ||
112 | return; | ||
113 | } | ||
114 | } | 106 | } |
115 | 107 | ||
116 | fn scan_byte_string(ptr: &mut Ptr) { | 108 | fn scan_byte_string(ptr: &mut Ptr) { |
117 | while let Some(c) = ptr.bump() { | 109 | scan_string(ptr) |
118 | if c == '"' { | ||
119 | return; | ||
120 | } | ||
121 | } | ||
122 | } | 110 | } |
123 | 111 | ||
124 | fn scan_raw_byte_string(ptr: &mut Ptr) { | 112 | fn scan_raw_byte_string(ptr: &mut Ptr) { |