We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da53cdd commit f7bcad3Copy full SHA for f7bcad3
src/parse.rs
@@ -302,14 +302,18 @@ fn literal_nocapture(input: Cursor) -> Result<Cursor, LexError> {
302
}
303
304
305
+fn literal_suffix(input: Cursor) -> Cursor {
306
+ match symbol_not_raw(input) {
307
+ Ok((input, _)) => input,
308
+ Err(LexError) => input,
309
+ }
310
+}
311
+
312
fn string(input: Cursor) -> Result<Cursor, LexError> {
313
if let Ok(input) = input.expect("\"") {
314
let input = cooked_string(input)?;
315
let input = input.expect("\"")?;
- match symbol_not_raw(input) {
- Ok((input, _)) => Ok(input),
- Err(LexError) => Ok(input),
- }
316
+ Ok(literal_suffix(input))
317
} else if let Ok(input) = input.expect("r") {
318
raw_string(input)
319
} else {
0 commit comments