usethesource / rascal-syntax-highlighting

TM Bundle for syntax highlighting Rascal code
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Problems with highlighting of regular expression literals and division #14

Closed ahmadsalim closed 6 years ago

ahmadsalim commented 7 years ago

I discovered the issue while I was doing something else. First of all there is a small bug in the grammar which was unnoticed:

Which is that in the regex: rule we should replace

begin: "/(?!/|*)"

with

begin: "/(?!/|\\*)"

Without fixing this issue the Atom highlighter breaks on certain files, but the TM/Sublime highlighter is also wrong.

Fixing this issue brings another issue with regards to division being accidentally seen as regex literals by the highlighter.

ahmadsalim commented 7 years ago

I will try to take a look in the weekend.