mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-07 10:08:25 +00:00
Fixed AS1/2 direct editation - postincrement/decrement
This commit is contained in:
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||
### Fixed
|
||||
- Japanese in english locales for Gotoaddress, addclass dialog
|
||||
- AS1/2 DefineFunction cleaner
|
||||
- AS1/2 direct editation - postincrement/decrement
|
||||
|
||||
## [14.5.2] - 2021-11-20
|
||||
### Fixed
|
||||
|
||||
@@ -1598,22 +1598,6 @@ public class ActionScript2Parser {
|
||||
}
|
||||
}
|
||||
|
||||
switch (lookahead.type) {
|
||||
case INCREMENT: //postincrement
|
||||
lex();
|
||||
if (!(lhs instanceof VariableActionItem) && !(lhs instanceof GetMemberActionItem)) {
|
||||
throw new ActionParseException("Invalid assignment", lexer.yyline());
|
||||
}
|
||||
lhs = new PostIncrementActionItem(null, null, lhs);
|
||||
break;
|
||||
case DECREMENT: //postdecrement
|
||||
lex();
|
||||
if (!(lhs instanceof VariableActionItem) && !(lhs instanceof GetMemberActionItem)) {
|
||||
throw new ActionParseException("Invalid assignment", lexer.yyline());
|
||||
}
|
||||
lhs = new PostDecrementActionItem(null, null, lhs);
|
||||
break;
|
||||
}
|
||||
if (debugMode) {
|
||||
System.out.println("/expression1");
|
||||
}
|
||||
@@ -2007,6 +1991,24 @@ public class ActionScript2Parser {
|
||||
}
|
||||
op = lex();
|
||||
}
|
||||
|
||||
switch (op.type) {
|
||||
case INCREMENT: //postincrement
|
||||
if (!(ret instanceof VariableActionItem) && !(ret instanceof GetMemberActionItem)) {
|
||||
throw new ActionParseException("Invalid assignment", lexer.yyline());
|
||||
}
|
||||
ret = new PostIncrementActionItem(null, null, ret);
|
||||
op = lex();
|
||||
break;
|
||||
case DECREMENT: //postdecrement
|
||||
if (!(ret instanceof VariableActionItem) && !(ret instanceof GetMemberActionItem)) {
|
||||
throw new ActionParseException("Invalid assignment", lexer.yyline());
|
||||
}
|
||||
ret = new PostDecrementActionItem(null, null, ret);
|
||||
op = lex();
|
||||
break;
|
||||
}
|
||||
|
||||
lexer.pushback(op);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user