Fix NumericLiteral::format
that may produce a invalid literal
This commit is contained in:
parent
04aa3f7e9b
commit
4e8cd4d346
@ -162,6 +162,9 @@ impl<'a> NumericLiteral<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(suffix) = self.suffix {
|
if let Some(suffix) = self.suffix {
|
||||||
|
if output.ends_with('.') {
|
||||||
|
output.push('0');
|
||||||
|
}
|
||||||
output.push('_');
|
output.push('_');
|
||||||
output.push_str(suffix);
|
output.push_str(suffix);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user