print SCOL after the program's expression, remove whitespace before the OPAR of the funtion definition

This commit is contained in:
2019-11-18 18:57:25 +01:00
parent 2af9f369cf
commit d8985bf070

View File

@@ -61,6 +61,7 @@ public class PrettyPrintVisitor implements Visitor<Void> {
ex.nl(); ex.nl();
} }
e.expression.welcome(this); e.expression.welcome(this);
ex.write(";");
return null; return null;
} }
@@ -151,7 +152,7 @@ public class PrettyPrintVisitor implements Visitor<Void> {
public Void visit(FunctionDefinition e) { public Void visit(FunctionDefinition e) {
ex.write("function "); ex.write("function ");
ex.write(e.name); ex.write(e.name);
ex.write(" ("); ex.write("(");
boolean first = true; boolean first = true;
for (String param : e.parameters) { for (String param : e.parameters) {
if (!first) { if (!first) {