atom / language-c

C support in Atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scientific number notation not recognised / scoped correctly with tree-sitter

binaryfunt opened this issue · comments

Prerequisites

Description

E-notation numbers (i.e. scientific / engineering notation) are not highlighting correctly with tree-sitter because they are receiving different scopes for the first number, the "e", the "-" or "+", and the power.

Screenshot (28)

Screenshot (29)

It doesn't matter if the "e" is uppercase or lowercase.

Versions

Atom: 1.35.0
Electron: 2.0.18
Windows: 10 v1803

Additional Information

For comparison, e-notation numbers in e.g. JavaScript are highlighted correctly (scope constant.numeric), if that's useful info.

Thanks for the report! Reproduced with 1.37.0-nightly12 on macOS 10.12.6. With Tree-sitter disabled:

tree-sitter-disabled

Thanks for the report! This will ship in Atom 1.38.