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

This commit is contained in:
Jindra Petřík
2021-02-16 20:54:02 +01:00
parent ce91b877e3
commit ba5c298bbd
3 changed files with 2 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- #1606 Run/Debug SWF that is embedded (has no file associated)
- AS3 direct editation - coerce in setproperty
- AS3 direct editation - unary minus (negate) compiled as 0 - value
- #1159, #1608 Regexp syntax hilight when not a regexp (only division) again
### Changed
- #1565, #1407, #1350 On BinaryData SWF save, parent SWF is saved

Binary file not shown.

View File

@@ -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;