Support c string literals

This commit is contained in:
Lukas Wirth 2023-05-18 11:06:05 +02:00
parent 099b5b3b15
commit 4b577e2bc8
21 changed files with 176 additions and 34 deletions

View file

@ -277,7 +277,7 @@ impl<'a> Converter<'a> {
if !terminated {
err = "Missing trailing `\"` symbol to terminate the string literal";
}
STRING
C_STRING
}
rustc_lexer::LiteralKind::RawStr { n_hashes } => {
if n_hashes.is_none() {
@ -295,7 +295,7 @@ impl<'a> Converter<'a> {
if n_hashes.is_none() {
err = "Invalid raw string literal";
}
STRING
C_STRING
}
};