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 42b56bf commit 7e9f878Copy full SHA for 7e9f878
crates/wit-parser/src/ast/lex.rs
@@ -135,6 +135,8 @@ impl<'a> Tokenizer<'a> {
135
Ok(ret)
136
}
137
138
+ // This is going to be used shortly for a new feature.
139
+ #[allow(dead_code)]
140
pub fn parse_str(&self, span: Span) -> Result<String> {
141
let mut ret = String::new();
142
let s = self.get_span(span);
@@ -367,11 +369,11 @@ impl<'a> Tokenizer<'a> {
367
369
Some((_, '"')) => return Ok(None),
368
370
Some((_, '\\')) => match self.chars.next() {
371
Some((_, '"')) => '"',
- Some((_, '\'')) => ('\''),
- Some((_, 't')) => ('\t'),
372
- Some((_, 'n')) => ('\n'),
373
- Some((_, 'r')) => ('\r'),
374
- Some((_, '\\')) => ('\\'),
+ Some((_, '\'')) => '\'',
+ Some((_, 't')) => '\t',
+ Some((_, 'n')) => '\n',
375
+ Some((_, 'r')) => '\r',
376
+ Some((_, '\\')) => '\\',
377
Some((i, c)) => return Err(Error::InvalidEscape(i, c)),
378
None => return Err(Error::UnterminatedString(start)),
379
},
0 commit comments