language-python icon indicating copy to clipboard operation
language-python copied to clipboard

PEP 515: Underscores in numeric literals

Open redfast00 opened this issue 7 years ago • 5 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:
    • Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
    • Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
    • Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
    • Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
    • Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description

Numbers like 100_000_000 aren't properly highlighted (see PEP 515 specification). This should be pretty easy to fix, just edit these lines in the grammar. I tried to fix this myself, but wasn't able to get atom dev running.

Steps to Reproduce

  1. Put 10_000_000 in source code.

Expected behavior: Proper highlighting

Actual behavior: Number highlighting stops in the middle of the number

Reproduces how often: 100%

Versions

Atom    : 1.23.3
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0

redfast00 avatar Jan 16 '18 20:01 redfast00

I tried to fix this myself, but wasn't able to get atom dev running.

Please ping me in the Slack channel or on Discuss and I'll help you out. I'm @Wliu on both.

winstliu avatar Jan 21 '18 01:01 winstliu

Why isn’t it fixed yet? Easy to do

Alexey-T avatar Oct 01 '19 17:10 Alexey-T

Are there any updates on this one?

kac487 avatar Sep 07 '21 17:09 kac487

@kac487 do you know if this is happening with the Tree Sitter grammar, or just the non-Tree Sitter one? (If you don't know, that's fine)

winstliu avatar Sep 14 '21 03:09 winstliu

Sorry, I don't know which one it is.

kac487 avatar Sep 18 '21 18:09 kac487