Checkstyle fix

This commit is contained in:
Jindra Petřík
2026-02-09 14:30:41 +01:00
parent 4fb1bd2276
commit f6224d6252
2 changed files with 19 additions and 20 deletions

View File

@@ -608,11 +608,11 @@ public class ActionScript2Parser {
System.out.println("expressionCommands:");
}
if (inWith) {
switch(s.type) {
switch (s.type) {
case DUPLICATEMOVIECLIP:
case GETURL:
case GOTOANDSTOP:
case GOTOANDPLAY:
case GOTOANDPLAY:
case NEXTFRAME:
case PLAY:
case PREVFRAME:
@@ -627,11 +627,11 @@ public class ActionScript2Parser {
GraphTargetItem functionName = pushConst((String) s.value);
expectedType(SymbolType.PARENT_OPEN);
List<GraphTargetItem> args = call(inWith, inFunction, inMethod, inTellTarget, variables, functions, hasEval);
return new CallFunctionActionItem(null, null, functionName, args);
return new CallFunctionActionItem(null, null, functionName, args);
}
}
GraphTargetItem ret = null;
GraphTargetItem ret = null;
switch (s.type) {
case DUPLICATEMOVIECLIP:
expectedType(SymbolType.PARENT_OPEN);
@@ -698,16 +698,16 @@ public class ActionScript2Parser {
if (s2.type == SymbolType.PARENT_CLOSE) {
ret = new GetURLActionItem(null, null, urlSymb.value.toString(), targetSymb.value.toString());
break;
}
}
lexer.pushback(s2);
}
lexer.pushback(targetSymb);
lexer.pushback(targetSymb);
} else if (s.type == SymbolType.PARENT_CLOSE) {
ret = new GetURLActionItem(null, null, urlSymb.value.toString(), "");
break;
break;
}
lexer.pushback(s);
lexer.pushback(urlSymb);
lexer.pushback(urlSymb);
} else {
lexer.pushback(s);
}
@@ -1146,7 +1146,7 @@ public class ActionScript2Parser {
TellTargetActionItem tt = new TellTargetActionItem(null, null, tellTarget, tellcmds);
if (inTellTarget) {
tt.nested = true;
}
}
ret = tt;
ret.line = tellTargetLine;
break;
@@ -2258,7 +2258,7 @@ public class ActionScript2Parser {
int index = constantPool.indexOf(s);
if (index == -1) {
int newItemLen = ActionConstantPool.calculateSize(s, charset);
if (constantPool.size() < 0xffff
if (constantPool.size() < 0xffff
&& constantPoolLength + newItemLen <= 0xffff) {
// constant pool is not full
constantPool.add(s);
@@ -2277,9 +2277,9 @@ public class ActionScript2Parser {
private ActionScriptLexer lexer = null;
private List<String> constantPool;
private int constantPoolLength = 2; //ActionConstantPool starts with UI16 constant count
/**
* Convert a string to a high-level model.
*

View File

@@ -287,7 +287,7 @@ public class ActionScript2SimpleParser implements SimpleParser {
expression(errors, false, false, false, false, true, subVariables, false, hasEval);
s = lex();
variables.add(new TraitVarConstValueScope(scopePos, s.position, subVariables, isStatic));
}
if (s.type != SymbolType.SEMICOLON) {
lexer.pushback(s);
@@ -359,12 +359,11 @@ public class ActionScript2SimpleParser implements SimpleParser {
break;
}
switch(s.type) {
switch (s.type) {
case DUPLICATEMOVIECLIP:
case GETURL:
case GOTOANDSTOP:
case GOTOANDPLAY:
case GOTOANDPLAY:
case NEXTFRAME:
case PLAY:
case PREVFRAME:
@@ -380,7 +379,7 @@ public class ActionScript2SimpleParser implements SimpleParser {
call(errors, inWith, inFunction, inMethod, inTellTarget, variables, hasEval);
return true;
}
switch (s.type) {
case DUPLICATEMOVIECLIP:
expectedType(errors, SymbolType.PARENT_OPEN);
@@ -831,7 +830,7 @@ public class ActionScript2SimpleParser implements SimpleParser {
variables.add(new Variable(true, new Path("this"), s.position));
List<VariableOrScope> subVariables = new ArrayList<>();
traits(errors, false, className, subVariables, inTellTarget, hasEval);
s = lex();
ClassScope cs = new ClassScope(scopePos, s.position, subVariables);
variables.add(cs);
@@ -1356,7 +1355,7 @@ public class ActionScript2SimpleParser implements SimpleParser {
case "dup":
expression(errors, inWith, inFunction, inMethod, inTellTarget, allowRemainder, variables, false, hasEval);
ret = true;
allowMemberOrCall = true;
allowMemberOrCall = true;
break;
case "push":
expression(errors, inWith, inFunction, inMethod, inTellTarget, allowRemainder, variables, false, hasEval);