mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 22:30:45 +00:00
AS1/2/3 highlighter - method references fix
This commit is contained in:
+1
-1
@@ -452,7 +452,7 @@ public class ActionScript3SimpleParser implements SimpleParser {
|
||||
lexer.pushback(s);
|
||||
}
|
||||
List<VariableOrScope> subvariables = new ArrayList<>();
|
||||
if (functionName != null && !functionName.isEmpty()) {
|
||||
if (!isMethod && functionName != null && !functionName.isEmpty()) {
|
||||
subvariables.add(new Variable(true, functionName, functionNamePos));
|
||||
}
|
||||
for (int i = 0; i < paramNames.size() - (hasRest ? 1 : 0); i++) {
|
||||
|
||||
+10
-7
@@ -193,7 +193,7 @@ public class ActionScript2SimpleParser implements SimpleParser {
|
||||
List<VariableOrScope> subvariables = new ArrayList<>();
|
||||
Reference<Boolean> subHasEval = new Reference<>(false);
|
||||
|
||||
if (!functionName.isEmpty()) {
|
||||
if (!isMethod && !functionName.isEmpty()) {
|
||||
variables.add(0, new Variable(true, functionName, functionNamePosition));
|
||||
}
|
||||
|
||||
@@ -243,17 +243,20 @@ public class ActionScript2SimpleParser implements SimpleParser {
|
||||
s = lex();
|
||||
}
|
||||
|
||||
if (expectedIdentifier(errors, s, lexer.yyline())) {
|
||||
if (!isInterface) {
|
||||
variables.add(function(errors, !isInterface, isStatic ? className + "." + s.value.toString() : "this." + s.value.toString(), isStatic ? -1 : s.position, true, traitVariables, inTellTarget, hasEval, isStatic));
|
||||
}
|
||||
if (!expectedIdentifier(errors, s, lexer.yyline())) {
|
||||
break;
|
||||
}
|
||||
traitVariables.add(new Variable(true, isStatic ? className + "." + s.value.toString() : "this." + s.value.toString(), s.position, isStatic));
|
||||
if (!isInterface) {
|
||||
variables.add(function(errors, !isInterface, isStatic ? className + "." + s.value.toString() : "this." + s.value.toString(), isStatic ? -1 : s.position, true, traitVariables, inTellTarget, hasEval, isStatic));
|
||||
}
|
||||
break;
|
||||
case VAR:
|
||||
s = lex();
|
||||
if (expectedIdentifier(errors, s, lexer.yyline())) {
|
||||
traitVariables.add(new Variable(true, isStatic ? className + "." + s.value.toString() : "this." + s.value.toString(), s.position, isStatic));
|
||||
if (!expectedIdentifier(errors, s, lexer.yyline())) {
|
||||
break;
|
||||
}
|
||||
traitVariables.add(new Variable(true, isStatic ? className + "." + s.value.toString() : "this." + s.value.toString(), s.position, isStatic));
|
||||
s = lex();
|
||||
if (s.type == SymbolType.COLON) {
|
||||
type(errors, false, variables);
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.simpleparser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
Reference in New Issue
Block a user