Merge remote-tracking branch 'origin/main' into remove-nat

This commit is contained in:
Richard Feldman 2024-01-30 21:42:45 -05:00
commit aabd95404f
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
104 changed files with 1031 additions and 651 deletions

View file

@ -1486,5 +1486,12 @@ fn number_literal_to_ast<T: std::fmt::Display>(arena: &Bump, num: T) -> Expr<'_>
let mut string = bumpalo::collections::String::with_capacity_in(64, arena);
write!(string, "{num}").unwrap();
Expr::Num(string.into_bump_str())
if string == "inf" {
Expr::Num("")
} else if string == "-inf" {
Expr::Num("-∞")
} else {
Expr::Num(string.into_bump_str())
}
}