fixed getChildren()

This commit is contained in:
JanUlrich 2014-04-09 15:54:20 +02:00
parent 5316b6ca51
commit 61e9c953c9
2 changed files with 13 additions and 4 deletions

View File

@ -270,7 +270,10 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) {
@Override
public Vector<SyntaxTreeNode> getChildren() {
throw new NotImplementedException();
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.expr1);
ret.add(this.expr2);
return ret;
}

View File

@ -136,8 +136,14 @@ public JavaCodeResult printJavaCode(ResultSet resultSet) {
@Override
public Vector<SyntaxTreeNode> getChildren() {
Vector<SyntaxTreeNode> ret = new Vector<SyntaxTreeNode>();
ret.add(this.body_Loop_block);
throw new NotImplementedException();
//return ret;
if(this.body_Loop_block!=null)ret.add(this.body_Loop_block);
if(this.head_Condition!=null)ret.add(this.head_Condition);
if(this.head_Condition_1!=null)ret.add(this.head_Condition_1);
if(this.head_Initializer!=null)ret.add(this.head_Initializer);
if(this.head_Initializer_1!=null)ret.add(this.head_Initializer_1);
if(this.head_Loop_expr!=null)ret.add(this.head_Loop_expr);
if(this.head_Loop_expr_1!=null)ret.add(this.head_Loop_expr_1);
//throw new NotImplementedException();
return ret;
}
}