mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 17:08: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()) {
|
if (ctxList.isEmpty()) {
|
||||||
return recipient;
|
return recipient;
|
||||||
}
|
}
|
||||||
DecafParser.RecipientContext ctx = ctxList.get(0);
|
int lastElement = ctxList.size() - 1;
|
||||||
ctxList.remove(0);
|
DecafParser.RecipientContext ctx = ctxList.get(lastElement);
|
||||||
|
ctxList.remove(lastElement);
|
||||||
if (ctx.id() != null) {
|
if (ctx.id() != null) {
|
||||||
return new FieldVarAccess(false, generateRecursiveOwnerChain(ctxList, recipient), ctx.id().IDENTIFIER().getText());
|
return new FieldVarAccess(false, generateRecursiveOwnerChain(ctxList, recipient), ctx.id().IDENTIFIER().getText());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user