darklua icon indicating copy to clipboard operation
darklua copied to clipboard

A way of converting number literals to decimals

Open jLn0n opened this issue 11 months ago • 1 comments

so uh basically, i want to have 0b000010 to be a decimal (result of that is 2) because lua compatibility

this rule will be called remove_number_literals since it literally removes (preferably converts) number literals to its decimal counterpart

jLn0n avatar Jan 29 '25 09:01 jLn0n

Hi 👋

I think it'd be preferable to call the rule something like convert_luau_numbers and it should do 2 things:

  • convert binary numbers into decimal numbers
  • remove _ from decimal or hexadecimal numbers

jeparlefrancais avatar Jan 29 '25 13:01 jeparlefrancais