goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

Goby panics when parsing a too big Integer literal #448

Closed 64kramsystem closed 6 years ago

64kramsystem commented 6 years ago

Instead of panic, a parsing error should be returned.

Example:

» 9223372036854775808
panic: could not parse "9223372036854775808" as integer

goroutine 1 [running]:
github.com/goby-lang/goby/compiler/parser.(*Parser).parseIntegerLiteral(0xc4201162d0, 0xb30df4, 0xc4201785f0)
64kramsystem commented 6 years ago

Addressed by #449.