-
Notifications
You must be signed in to change notification settings - Fork 0
Description
golang/go#28256 got closed, sadly, but that made me think about possibly implementing something like that in WDTE instead. I'd like to do it slightly differently than it was proposed in there, however.
Currently, WDTE has no support for any base other than decimal. The idea is to allow an optional prefix to a number in the form <digit>x, such as 8x. The digit given would indicated the highest digit of the base being used, so 8x would be octal, 2x would be binary, and Fx would be hex. It's likely that it'll be required to be uppercase for digits above 9.
In addition to this, underscores would be allowed to be inserted in number literals, similar to golang/go#28493, allowing the user to break up, among other things, long binary literals. A number would be required to start with at least one digit, so Fx3_2 would be legal, but Fx_32 would not.
Also, non-decimal bases will probably not be allowed for non-integers, but I'm not entirely sure yet.