From 561f1d11508735af6764c7067b48869ecbbc3d47 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 6 Apr 2017 12:12:06 +0200 Subject: [PATCH] Fehler beim Parsen von Method behoben --- .../parser/SyntaxTreeGenerator/StatementGenerator.java | 2 ++ src/de/dhbwstuttgart/syntaxtree/statement/CastExpr.java | 1 + 2 files changed, 3 insertions(+) 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;