- Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
✨ enhancementNew feature or requestNew feature or request📁 ./compilerChanges, errors, and additions for the compilerChanges, errors, and additions for the compiler
Description
I suggest we update the frontend of Troupe to support commonly supported notation for integer literals. This notation is widely supported in a vast number of programming languages (Python, OCaml, Scala, Rust, etc.).
For concreteness this involves the following tasks:
- Add support for numeric literal prefixes
0b(base-2),0o(base-8), and0x(base-16). For example we then could write28as0b11100,0o34, or0x1c. - Add support for using
_as a separator for integer literals, so1000000can also be written1_000_000.
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or requestNew feature or request📁 ./compilerChanges, errors, and additions for the compilerChanges, errors, and additions for the compiler