mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 08:38:03 +00:00
generate FieldVarAcces back to front instead of front to back
This commit is contained in:
parent
48b41f67f4
commit
29a63e3771
@ -115,8 +115,9 @@ public class ExpressionGenerator extends DecafBaseVisitor<Expression> {
|
||||
if (ctxList.isEmpty()) {
|
||||
return recipient;
|
||||
}
|
||||
DecafParser.RecipientContext ctx = ctxList.get(0);
|
||||
ctxList.remove(0);
|
||||
int lastElement = ctxList.size() - 1;
|
||||
DecafParser.RecipientContext ctx = ctxList.get(lastElement);
|
||||
ctxList.remove(lastElement);
|
||||
if (ctx.id() != null) {
|
||||
return new FieldVarAccess(false, generateRecursiveOwnerChain(ctxList, recipient), ctx.id().IDENTIFIER().getText());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user