print les strings

This commit is contained in:
Vu Tuan Minh
2025-04-08 11:38:36 +02:00
parent b4bafcde5d
commit b0aa0d98ff
4 changed files with 19 additions and 8 deletions

View File

@@ -60,7 +60,11 @@ public class PrettyprinterVisitor implements ProgramVisitor<String,String>,
@Override
public String visitPrint(PrintImp instr, String indent) {
return indent+ "PRINT \""+instr.t() +"\"";
String str = indent + "PRINT ";
for (String elem: instr.t()){
str += "\"" +elem +"\"";
}
return str;
}
//EXPRESSION