params function
This commit is contained in:
@@ -36,9 +36,9 @@ public class PrettyprinterVisitor implements ProgramVisitor<String,String>,
|
||||
public String visitPrototype(PrototypeImp proto, String indent){
|
||||
String str= indent + "PROTO "+proto.type().accept(this, "")+ " "+ proto.nom() + "(";
|
||||
|
||||
for(int i=0; i<proto.s().size();i++){
|
||||
str+=proto.s().get(i);
|
||||
if((i<proto.s().size()-1)){
|
||||
for(int i=0; i<proto.params().size();i++){
|
||||
str+=proto.params().get(i);
|
||||
if((i<proto.params().size()-1)){
|
||||
str+=", ";
|
||||
}
|
||||
}
|
||||
@@ -51,9 +51,9 @@ public class PrettyprinterVisitor implements ProgramVisitor<String,String>,
|
||||
public String visitFunction(FunctionImp fun, String indent) {
|
||||
String str = indent+"FUNC " + fun.type().accept(this,"")+ " " + fun.nom() +"(";
|
||||
|
||||
for(int i=0; i<fun.s().size();i++){
|
||||
str+=fun.s().get(i);
|
||||
if((i<fun.s().size()-1)){
|
||||
for(int i=0; i<fun.params().size();i++){
|
||||
str+=fun.params().get(i);
|
||||
if((i<fun.params().size()-1)){
|
||||
str+=", ";
|
||||
}
|
||||
}
|
||||
@@ -202,4 +202,4 @@ public class PrettyprinterVisitor implements ProgramVisitor<String,String>,
|
||||
return e.name();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user