* Implement missing constructor for Modifiers.

* TODO: convert for Modifier
This commit is contained in:
Jakob Herrmann 2017-01-17 00:58:03 +01:00
parent 0db15bffa8
commit 9ef41280ca
2 changed files with 16 additions and 1 deletions

View File

@ -66,6 +66,14 @@ public class SyntaxTreeGenerator{
Java8Parser.NormalClassDeclarationContext nc = cl.normalClassDeclaration();
if(nc != null){
Modifiers modifiers = null;
if(nc.classModifier() != null){
List<Modifier> modList = new ArrayList();
for(Java8Parser.ClassModifierContext mod : nc.classModifier()){
Modifier m = convert(mod);
modList.add(m);
}
modifiers = new Modifiers(modList);
}
JavaClassName name = null;
if(this.pkgName != null){
name = new JavaClassName(this.pkgName +"."+ nc.Identifier().toString());
@ -73,7 +81,6 @@ public class SyntaxTreeGenerator{
else{
name = new JavaClassName(nc.Identifier().toString());
}
System.out.println("Created name" + name);
Block class_block = null;
List<Field> fielddecl = null;
GenericDeclarationList genericClassParameters = null;
@ -86,4 +93,8 @@ public class SyntaxTreeGenerator{
}
return null;
}
private Modifier convert(Java8Parser.ClassModifierContext ctx){
return null;
}
}

View File

@ -15,6 +15,10 @@ import java.util.List;
public class Modifiers
{
protected List<Modifier> modifier = new ArrayList<Modifier>();
public Modifiers(List<Modifier> modifier){
this.modifier = modifier;
}
// ino.end