Reason: Underscore in numbers

Created on 1 Jan 2017  路  4Comments  路  Source: reasonml/reason

OCaml and Reason support underscores in numbers - usually used for readability - 3_000_000. When you refmt, these underscores get removed. Is this intentional? It seems like these underscores should be preserved if possible to maintain readability and intent.

Most helpful comment

This should be possible/more possible once the move to the 4.04.0 OCaml AST happens. The newer AST keeps the string representation of each numeric literal from the original code.

All 4 comments

This should be possible/more possible once the move to the 4.04.0 OCaml AST happens. The newer AST keeps the string representation of each numeric literal from the original code.

Kind of duplicated with #511, let's merge this two.

@hcarty Wow, I didn't know that. Seems like a great feature.

@jordwalke From this PR - https://github.com/ocaml/ocaml/pull/170

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenglou picture chenglou  路  3Comments

ostera picture ostera  路  3Comments

cristianoc picture cristianoc  路  4Comments

shaneosullivan picture shaneosullivan  路  3Comments

TrakBit picture TrakBit  路  3Comments