Fix NumericLiteral::format that may produce a invalid literal

This commit is contained in:
Yoshitomo Nakanishi 2021-07-13 22:56:41 +09:00
parent 04aa3f7e9b
commit 4e8cd4d346

View file

@ -162,6 +162,9 @@ impl<'a> NumericLiteral<'a> {
}
if let Some(suffix) = self.suffix {
if output.ends_with('.') {
output.push('0');
}
output.push('_');
output.push_str(suffix);
}