From 1f5071d4e4d2ac7deaa81fd77e8dd0387db1bb6a Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 19 Jan 2018 15:24:49 +0100 Subject: [PATCH] =?UTF-8?q?Methode=20soll=20kein=20Feld=20mehr=20sein.=20N?= =?UTF-8?q?icht=20lauff=C3=A4hig!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/syntaxtree/Field.java | 2 +- src/de/dhbwstuttgart/syntaxtree/Method.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 421f0ff33..4ee1675ee 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -5,7 +5,7 @@ import org.antlr.v4.runtime.Token; import java.util.ArrayList; -public class Field extends SyntaxTreeNode implements TypeScope{ +public class Field extends SyntaxTreeNode { private String name; private RefTypeOrTPHOrWildcardOrGeneric type; diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 3686fb4ee..fd4ad1808 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -22,7 +22,7 @@ import de.dhbwstuttgart.syntaxtree.statement.Block; * @author janulrich * */ -public class Method extends Field implements IItemWithOffset +public class Method implements IItemWithOffset, TypeScope { public final Block block; private ParameterList parameterlist = new ParameterList(new ArrayList<>(), new NullToken()); @@ -54,4 +54,9 @@ public class Method extends Field implements IItemWithOffset public void accept(ASTVisitor visitor) { visitor.visit(this); } + + @Override + public Token getOffset() { + return null; + } }