mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 23:10:46 +00:00
Added: #2477 Option to disable AS2 detection of uninitialized class fields
Added: AS2 detection of uninitialized class fields is cancellable and shows progress Changed: Icon of "Deobfuscation options" menu from pile of pills to medkit Fixed: Comments color highlighting
This commit is contained in:
@@ -64,9 +64,13 @@ import java.util.List;
|
||||
this.offset = ofst;
|
||||
prevToken = null;
|
||||
Token t = yylex();
|
||||
prevToken = t;
|
||||
if (t.type != TokenType.COMMENT) {
|
||||
prevToken = t;
|
||||
}
|
||||
for (; t != null; t = yylex()) {
|
||||
prevToken = t;
|
||||
if (t.type != TokenType.COMMENT) {
|
||||
prevToken = t;
|
||||
}
|
||||
tokens.add(t);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
@@ -187,9 +191,14 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
"typeof" |
|
||||
"void" { return token(TokenType.KEYWORD); }
|
||||
|
||||
/* comments */
|
||||
{Comment} { return token(TokenType.COMMENT); }
|
||||
|
||||
|
||||
{RegExp} {
|
||||
if (prevToken == null || (prevToken.type == TokenType.OPERATOR && prevToken.pairValue >= 0)) {
|
||||
if (prevToken == null
|
||||
|| (prevToken.type == TokenType.OPERATOR && prevToken.pairValue >= 0)
|
||||
) {
|
||||
return token(TokenType.REGEX);
|
||||
} else {
|
||||
int ch = yychar;
|
||||
@@ -201,7 +210,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
|
||||
/* operators */
|
||||
|
||||
"(" { return token(TokenType.OPERATOR, PAREN); }
|
||||
"(" { return token(TokenType.OPERATOR, PAREN); }
|
||||
")" { return token(TokenType.OPERATOR, -PAREN); }
|
||||
"{" { return token(TokenType.OPERATOR, CURLY); }
|
||||
"}" { return token(TokenType.OPERATOR, -CURLY); }
|
||||
@@ -286,9 +295,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
|
||||
// JavaDoc comments need a state so that we can highlight the @ controls
|
||||
|
||||
/* comments */
|
||||
{Comment} { return token(TokenType.COMMENT); }
|
||||
|
||||
|
||||
/* whitespace */
|
||||
{WhiteSpace} { }
|
||||
/* identifiers */
|
||||
|
||||
+10
-8
@@ -66,9 +66,13 @@ import java.util.List;
|
||||
this.offset = ofst;
|
||||
prevToken = null;
|
||||
Token t = yylex();
|
||||
prevToken = t;
|
||||
if (t.type != TokenType.COMMENT) {
|
||||
prevToken = t;
|
||||
}
|
||||
for (; t != null; t = yylex()) {
|
||||
prevToken = t;
|
||||
if (t.type != TokenType.COMMENT) {
|
||||
prevToken = t;
|
||||
}
|
||||
tokens.add(t);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
@@ -211,6 +215,9 @@ VerbatimString = "@\"" {VerbatimStringCharacter}* "\""
|
||||
|
||||
"new" { prevNew = true; return token(TokenType.KEYWORD); }
|
||||
|
||||
/* comments */
|
||||
{Comment} { return token(TokenType.COMMENT); }
|
||||
|
||||
{RegExp} {
|
||||
prevNew = false;
|
||||
if (prevToken == null || (prevToken.type == TokenType.OPERATOR && prevToken.pairValue >= 0)) {
|
||||
@@ -324,12 +331,7 @@ VerbatimString = "@\"" {VerbatimStringCharacter}* "\""
|
||||
|
||||
{DoubleLiteral} |
|
||||
{DoubleLiteral}[dD] { prevNew = false; return token(TokenType.NUMBER); }
|
||||
|
||||
// JavaDoc comments need a state so that we can highlight the @ controls
|
||||
|
||||
/* comments */
|
||||
{Comment} { prevNew = false; return token(TokenType.COMMENT); }
|
||||
|
||||
|
||||
/* whitespace */
|
||||
{WhiteSpace} { }
|
||||
{XMLBeginOneTag} {
|
||||
|
||||
Reference in New Issue
Block a user