diff options
author | Kurt McKee <contactme@kurtmckee.org> | 2020-09-06 07:53:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 14:53:35 +0200 |
commit | 5ec283a3592dfdef7aff34ab00ca8685c4d37470 (patch) | |
tree | dc2f7a3013dcda614bf63e7c9c643924d4f9c4e2 /pygments/lexers/basic.py | |
parent | 43c280b18596bf3f8905232083f1239aca6ef9fd (diff) | |
download | pygments-git-5ec283a3592dfdef7aff34ab00ca8685c4d37470.tar.gz |
Overhaul Javascript numeric literals (#1534)
* Rename the "Javascript" tests to reflect that they are for CoffeeScript
This change also modifies the module docstring to reflect the file's purpose.
* Overhaul the Javascript numeric literal parsing
Fixes #307
This patch contains the following changes:
* Adds 50+ unit tests for Javascript numeric literals
* Forces ASCII numbers for float literals (so, now reject `.рнк`)
* Adds support for Javascript's BigInt notation (`100n`)
* Adds support for leading-zero-only octal notation (`0777`)
* Adds support for scientific notation with no significand (`1e10`)
Numeric literal parsing is based on information at:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures
Diffstat (limited to 'pygments/lexers/basic.py')
0 files changed, 0 insertions, 0 deletions