Fixed #1159, #1608 Regexp syntax hilight when not a regexp (only division) again

This commit is contained in:
Jindra Petřík
2021-02-24 19:55:59 +01:00
parent ce91b877e3
commit ba5c298bbd
3 changed files with 2 additions and 1 deletions
@@ -203,7 +203,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
{RegExp} {
if (prevToken == null || prevToken.type == TokenType.OPERATOR) {
if (prevToken == null || (prevToken.type == TokenType.OPERATOR && prevToken.pairValue >= 0)) {
return token(TokenType.REGEX);
} else {
int ch = yychar;