sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
114 stars 43 forks source link

Very large double-precision literals with a trailing # are treated like conditional compilation code #616

Closed sjbarag closed 3 years ago

sjbarag commented 3 years ago

In RBI it's perfectly valid to use a numeric literal of more than ten characters and still use the # operator to explicitly mark it as a double. In brs, that causes a lexing error:

sub main()
    if (3 >= 9999999999999999999#)
        print "oh no"
    else
        print "phew"
    end if
end sub
hash-in-conditional.brs(2,32-34): Found unexpected conditional-compilation string '#)'
Error occurred during lexing