diff --git a/src/main/java/bytecode/MethodCodeGen.java b/src/main/java/bytecode/MethodCodeGen.java index 95b5c40..563027e 100644 --- a/src/main/java/bytecode/MethodCodeGen.java +++ b/src/main/java/bytecode/MethodCodeGen.java @@ -148,8 +148,16 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor { @Override public void visit(DotSubstractionNode dotSubstractionNode) { - if (dotSubstractionNode.value != null) { // local var + if (dotSubstractionNode.value != null) { dotSubstractionNode.value.accept(this); + } else if(dotSubstractionNode.identifier != null) { + methodVisitor.visitVarInsn(ILOAD, localVaribales.indexOf(dotSubstractionNode.identifier)); + } else if(dotSubstractionNode.memberAccess != null) { + dotSubstractionNode.memberAccess.accept(this); + } else if(dotSubstractionNode.methodCall != null) { + dotSubstractionNode.methodCall.accept(this); + } else if(dotSubstractionNode.calculationExpression != null) { + dotSubstractionNode.calculationExpression.accept(this); } }