mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge remote-tracking branch 'origin/main' into remove-nat
This commit is contained in:
commit
aabd95404f
104 changed files with 1031 additions and 651 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue