diff --git a/src/de/dhbwstuttgart/parser/RunParser.java b/src/de/dhbwstuttgart/parser/RunParser.java index 8912d4942..08228eb0b 100644 --- a/src/de/dhbwstuttgart/parser/RunParser.java +++ b/src/de/dhbwstuttgart/parser/RunParser.java @@ -35,6 +35,11 @@ public class RunParser{ System.out.println(mod.getClass().getName()); } System.out.println(c.getClassName().toString()); + System.out.println("{"); + for(Field field : c.getFieldDecl()){ + System.out.println(field.getName()); + } + System.out.println("}"); } } catch(java.util.NoSuchElementException e){ diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java index 9d280aff6..f82ae0574 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java @@ -55,5 +55,9 @@ public class ClassOrInterface extends GTVDeclarationContext implements IItemWith public Modifiers getModifiers(){ return this.modifiers; } + + public List getFieldDecl(){ + return this.fielddecl; + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/Field.java b/src/de/dhbwstuttgart/syntaxtree/Field.java index 9eaf79420..5482a4c5a 100644 --- a/src/de/dhbwstuttgart/syntaxtree/Field.java +++ b/src/de/dhbwstuttgart/syntaxtree/Field.java @@ -19,6 +19,8 @@ public class Field extends GTVDeclarationContext implements Generic { this.type = type; } - + public String getName(){ + return this.name; + } }