Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.
84 stars 39 forks source link

broken syntax highlight after regex pattern ~/OPERATOR/ #108

Closed prenaux closed 6 years ago

prenaux commented 6 years ago

Example:

somePattern = ~/+/;

final int foo = -1;
final int bar = -1;
final int foo = -1;

The pattern ~/+/ causes everything afterward to be highlighted as a slashy string I believe.

untitled

Looks like the fact that + is an operator is the issue, =, -, etc... give the same result. But putting a regular letter or digit doesn't exhibit this problem. Also removing the tilde (~) before the first / "fix" the problem.

prenaux commented 6 years ago

See #109 for a potential fix.