jank-lang / jank

The native Clojure dialect hosted on LLVM
https://jank-lang.org
Mozilla Public License 2.0
1.69k stars 50 forks source link

Support more robust integer lexing (hex, octal, and arbitrary radix) #108

Open jeaye opened 1 month ago

jeaye commented 1 month ago

Clojure docs: https://www.clojure.org/guides/learn/syntax#_numeric_types

In particular, we need to support the following:

We can use std::stol for all of this, which also takes in the radix. We should check the position output param to ensure that the full number was consumed. If not, it's invalid.

jianlingzhong commented 6 days ago

i can take this one.