diff --git a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java index ecb095d1..68b6afda 100644 --- a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java +++ b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java @@ -229,6 +229,8 @@ public class StatementGenerator { receiver = convert(methodInvocationContext.primary()); }else if(methodInvocationContext.toString().startsWith("super")){ receiver = new Super(methodInvocationContext.getStart()); + }else if(methodInvocationContext.methodName() != null){ + receiver = new This(methodInvocationContext.getStart()); }else throw new NotImplementedException(); ArgumentList argumentList = convert(methodInvocationContext.argumentList()); diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java index 145433bd..a8294daf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java @@ -12,6 +12,7 @@ public class CastExpr extends Expression public CastExpr(RefTypeOrTPHOrWildcardOrGeneric castType, Expression expr, Token offset) { super(castType, offset); + this.expr = expr; } public Expression expr;