mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
RocDec::from_str accept 'e' exponent notation
The intent of this change is to allow roc dec values to be parsed from strings using the 'e' exponent notation, eg '1e3' as a notation for '1000'. Fixes #7351
This commit is contained in:
parent
57cab7f69a
commit
b5ce935d89
2 changed files with 71 additions and 65 deletions
|
@ -40,6 +40,11 @@ fn literal_4point2() {
|
|||
expect_success("4.2", "4.2 : Frac *");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn literal_4point2e3() {
|
||||
expect_success("4.2e3", "4200 : Frac *");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn num_addition() {
|
||||
expect_success("1 + 2", "3 : Num *");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue