Open dsamarin opened 13 years ago
We probably won't be able to support long long
for a little while, but when we do I would use an object like:
{ size: 64, hi: 0xFF, lo: 0x432 } = 0x000000FF00000432
We'd have to do a few complex things though, like implementation of the Karatsuba algorithm for multiplication.
Number tokenizing is very long and complex. As of now there isn't a suitable token type for them. The
long long
needs to be represented with 64-bit integers, which JS does not support natively.Here's some old code with doesn't tokenize, but goes through the basic steps of tokenizing. It is untested. https://github.com/oftn/coca/blob/4ac315fb329a09871277bbe3a033dc79488993c6/CParse.js