Constellation/escodegen — pull request #17 by RGustBardon (2012-07-17 17:01:46+00:00)
Title: Add JSON and concise representation of numbers

Introduces options.format.json, options.format.renumber, and
options.format.hexadecimal.

As yet, options.format.json does not affect string literals.

options.format.json takes precedence over options.parse and disallows
options.format.hexadecimal.

options.format.hexadecimal requires options.format.renumber.

Added .gitignore for Emacs and Cover.

options.format.json represents positive infinity using the null literal as in
JSON.stringify(1e400)

options.format.json and options.format.reduce result in 4.2e+100
becoming 42e99, 42000 becoming 42e3, and 0.0042 becoming 42e-4.

Without options.format.json, options.format.reduce additionally
results in 0.0042 becoming .0042.

With options.format.hexadecimal, 1000000000001 becomes 0xe8d4a51001.

Swapped keys with values for the items key of the elements of data in
test/options.js

Put options.format.base and options.format.indent in
options.format.indent.style in test/options.js

Fixed expected being overwritten in runTest in test/options.js