Fixed #2430 AS1/2/3 - Missing syntax hilighting of "new" keyword and few others

This commit is contained in:
Jindra Petřík
2025-04-06 13:58:45 +02:00
parent d7dbc7e391
commit e551fb8dc4
4 changed files with 18 additions and 16 deletions

View File

@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
- [#2436] PDF export clipping - missing colors / text
- [#2437] AS1 P-code - do not group pushes automatically
- [#2437] AS1 - use Constant pool only on FP5+
- [#2430] AS1/2/3 - Missing syntax hilighting of "new" keyword and few others
## [22.0.2] - 2025-01-17
### Added
@@ -3702,6 +3703,7 @@ Major version of SWF to XML export changed to 2.
[#2391]: https://www.free-decompiler.com/flash/issues/2391
[#2436]: https://www.free-decompiler.com/flash/issues/2436
[#2437]: https://www.free-decompiler.com/flash/issues/2437
[#2430]: https://www.free-decompiler.com/flash/issues/2430
[#2375]: https://www.free-decompiler.com/flash/issues/2375
[#2374]: https://www.free-decompiler.com/flash/issues/2374
[#2389]: https://www.free-decompiler.com/flash/issues/2389

Binary file not shown.

View File

@@ -182,7 +182,12 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
"false" |
"null" |
"this" |
"true" { return token(TokenType.KEYWORD); }
"true" |
"delete" |
"instanceof" |
"new" |
"typeof" |
"void" { return token(TokenType.KEYWORD); }
{RegExp} {
@@ -244,12 +249,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
"%=" |
"<<=" |
">>=" |
">>>=" |
"delete" |
"instanceof" |
"new" |
"typeof" |
"void" |
">>>=" |
{NewVector} |
"@" { return token(TokenType.OPERATOR); }

View File

@@ -205,7 +205,14 @@ VerbatimString = "@\"" {VerbatimStringCharacter}* "\""
"false" |
"null" |
"this" |
"true" { return token(TokenType.KEYWORD); }
"true" |
"as" |
"delete" |
"instanceof" |
"is" |
"new" |
"typeof" |
"void" { return token(TokenType.KEYWORD); }
{RegExp} {
@@ -279,15 +286,8 @@ VerbatimString = "@\"" {VerbatimStringCharacter}* "\""
"<<=" |
">>=" |
">>>=" |
"as" |
"delete" |
"instanceof" |
"is" |
"::" |
"new" |
"typeof" |
"void" |
{NewVector} |
{NewVector} |
"@" { return token(TokenType.OPERATOR); }
/* string literal */