update and add a few tests

This commit is contained in:
Deadbeef
2023-03-06 07:10:23 +00:00
parent 8ff3903643
commit 76d1f93896
11 changed files with 48 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ impl LitKind {
}
});
error?;
buf.push(b'\0');
buf.push(0);
LitKind::CStr(buf.into(), StrStyle::Cooked)
}
token::CStrRaw(n) => {
@@ -204,7 +204,7 @@ impl LitKind {
}
});
error?;
buf.push(b'\0');
buf.push(0);
LitKind::CStr(buf.into(), StrStyle::Raw(n))
}
token::Err => LitKind::Err,