You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Gleam, numbers are allowed to look something like this: 0x_abcd, whereas in JavaScript, the 0x prefix (along with 0b and 0o) cannot be followed immediately by an underscore.
Since the Gleam compiler currently performs no transformation on numbers when compiling to JavaScript, this causes a syntax error.
This is not a problem on Erlang as the compiler already has to transform 0x in 16#, and the invalid syntax is eliminated in the process.
We can probably just check for 0b_, 0x_ and 0o_ at the start of numbers and remove the underscore in that case.
The text was updated successfully, but these errors were encountered:
In Gleam, numbers are allowed to look something like this:
0x_abcd
, whereas in JavaScript, the0x
prefix (along with0b
and0o
) cannot be followed immediately by an underscore.Since the Gleam compiler currently performs no transformation on numbers when compiling to JavaScript, this causes a syntax error.
This is not a problem on Erlang as the compiler already has to transform
0x
in16#
, and the invalid syntax is eliminated in the process.We can probably just check for
0b_
,0x_
and0o_
at the start of numbers and remove the underscore in that case.The text was updated successfully, but these errors were encountered: