jashkenas--coffeescript/lib/coffee-script
Simon Lydell 57f5297714 Handle very large hexadecimal number literals correctly
Very large decimal number literals, binary number literals and octal
literals are lexed into an INFINITY token (instead of a NUMBER token)
and compiled into `2e308`. That is is supposed to be the case for very
large hexdecimal dumber literals as well, but previously wasn't.

Before:

    $ node -p 'require("./").tokens(`0x${Array(256 + 1).join("f")}`)[0][0]'
    NUMBER

After:

    $ node -p 'require("./").tokens(`0x${Array(256 + 1).join("f")}`)[0][0]'
    INFINITY

This commit also cleans up `numberToken` in lexer.coffee a bit.
2016-09-26 16:33:57 +02:00
..
browser.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
cake.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
coffee-script.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
command.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
grammar.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
helpers.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
index.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
lexer.js Handle very large hexadecimal number literals correctly 2016-09-26 16:33:57 +02:00
nodes.js Fix `isLiteralArguments` 2016-09-26 15:33:44 +02:00
optparse.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
parser.js Support import and export of ES2015 modules (#4300) 2016-09-14 20:46:05 +02:00
register.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
repl.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
rewriter.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
scope.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00
sourcemap.js CoffeeScript 1.11.0 2016-09-24 14:16:00 +02:00