syntax: support multiprecision integer literals
alandonovan opened this issue · 1 comments
alandonovan commented
Currently the scanner refuses to parse integer literals that can't be represented as int64
:
$ skylark
Welcome to Skylark (github.com/google/skylark)
>>> 1234567890123456789
1234567890123456789
>>> 12345678901234567890
...
<stdin>:1:1: invalid int literal
The solution is to change the syntax.Literal.Value to allow string
, int64
, or *big.Int
, and change the interpreter accordingly.
Also, the comment next to the Value field is wrong: it says int, not int64.
alandonovan commented
Fixed by #58.