mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 23:21:36 +00:00
Fixed AS3 interfaces - internal modifier on methods
This commit is contained in:
+7
-6
@@ -697,27 +697,28 @@ public class ActionScript3Parser {
|
||||
case PUBLIC:
|
||||
namespace = publicNs;
|
||||
if (isInterface) {
|
||||
throw new AVM2ParseException("Interface cannot have public, private or protected modifier", lexer.yyline());
|
||||
throw new AVM2ParseException("Interface members cannot be declared public, private, protected, or internal", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case PRIVATE:
|
||||
isPrivate = true;
|
||||
namespace = privateNs;
|
||||
if (isInterface) {
|
||||
throw new AVM2ParseException("Interface cannot have public, private or protected modifier", lexer.yyline());
|
||||
throw new AVM2ParseException("Interface members cannot be declared public, private, protected, or internal", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case PROTECTED:
|
||||
namespace = protectedNs;
|
||||
if (isInterface) {
|
||||
throw new AVM2ParseException("Interface cannot have public, private or protected modifier", lexer.yyline());
|
||||
throw new AVM2ParseException("Interface members cannot be declared public, private, protected, or internal", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case INTERNAL:
|
||||
namespace = packageInternalNs;
|
||||
break;
|
||||
|
||||
|
||||
if (isInterface) {
|
||||
throw new AVM2ParseException("Interface members cannot be declared public, private, protected, or internal", lexer.yyline());
|
||||
}
|
||||
break;
|
||||
case PREPROCESSOR:
|
||||
if (((String)s.value).toLowerCase().equals("namespace")) {
|
||||
expectedType(SymbolType.PARENT_OPEN);
|
||||
|
||||
@@ -349,7 +349,9 @@ public abstract class Trait implements Cloneable, Serializable {
|
||||
|
||||
Namespace ns = m.getNamespace(abc.constants);
|
||||
|
||||
if (ns.kind == Namespace.KIND_NAMESPACE && nsname == null && !insideInterface) {
|
||||
if (insideInterface) {
|
||||
//no namespace identifier
|
||||
} else if (ns.kind == Namespace.KIND_NAMESPACE && nsname == null) {
|
||||
writer.append("§§namespace(\"");
|
||||
writer.append(Helper.escapeActionScriptString(ns.getRawName(abc.constants)));
|
||||
writer.append("\") ");
|
||||
|
||||
Reference in New Issue
Block a user