Closed husseinkhaleel closed 5 years ago
@maxbrunsfeld These seem to parse as syntax error:
They should be correct syntax. I use ruby 2.4.2, and these lines execute correctly on my PC. Here is ruby language documentation: https://docs.ruby-lang.org/en/2.0.0/syntax/literals_rdoc.html If one looks into the "Numbers" section, it says: "The alphabetic component of the number is not case-sensitive" There are also examples with upper- and lower-case.
In the ruby.cson file on this repository, the identification 'pattern' for numeric checks for both upper- and lower-cases, as shown in the image below.
Prerequisites
Description
With tree-sitter enabled, numbers with a decimal point (1.0) and e (e.g. 1e3) are not highlighted. Also, numbers defined with capital B (binary) and capital D (decimal) are not highlighted correctly, and possibly parsed under a different category. Small letter b and d are highlighted correctly though. These were the numerical representations that were tested, others could also have the same problem. When tree-sitter is disabled, the highlighting is correct/as expected. This is shown in the images below.
Tree-sitter enabled (by default):
Tree-sitter disabled:
Steps to Reproduce
Expected behavior: All numerical values should be highlighted correctly.
Actual behavior:
Reproduces how often: 100%
Versions
$ atom --version Atom : 1.32.2 Electron: 2.0.9 Chrome : 61.0.3163.100 Node : 8.9.3
$ apm --version apm 2.1.2 npm 6.2.0 node 8.9.3 x64 atom 1.32.2 python 2.7.10 git 2.18.0
MacOS Mojave Version 10.14.1 (18B75)
Additional Information
N/A