We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecf1e6f commit 2a475d5Copy full SHA for 2a475d5
src/conversion.jl
@@ -116,7 +116,7 @@ function Expr_float(x)
116
if 'f' in x.val
117
return Base.parse(Float32, replace(x.val, 'f' => 'e'))
118
end
119
- Base.parse(Float64, x.val)
+ Base.parse(Float64, replace(x.val, "_" => ""))
120
121
function Expr_char(x)
122
val = _unescape_string(x.val[2:prevind(x.val, sizeof(x.val))])
test/parser.jl
@@ -735,4 +735,8 @@ end
735
@test "\"αhelloworldω\"" |> test_expr
736
737
738
+@testset "conversion of floats with underscore" begin
739
+ @test "30.424_876_125_859_513" |> test_expr
740
+end
741
+
742
0 commit comments