* Some getters in syntaxtree

* Extend RunParser (makes problems).
This commit is contained in:
Jakob Herrmann 2017-02-15 12:22:06 +01:00
parent 7f05966093
commit b5a2d64a7b
3 changed files with 12 additions and 1 deletions

View File

@ -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){

View File

@ -55,5 +55,9 @@ public class ClassOrInterface extends GTVDeclarationContext implements IItemWith
public Modifiers getModifiers(){
return this.modifiers;
}
public List<Field> getFieldDecl(){
return this.fielddecl;
}
}

View File

@ -19,6 +19,8 @@ public class Field extends GTVDeclarationContext implements Generic {
this.type = type;
}
public String getName(){
return this.name;
}
}