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

@@ -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 */