Commit a52e3838 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Fixed PrettyPrinter indentation

parent ed1e4c15
......@@ -122,9 +122,8 @@ aspect GenPrettyPrinter {
pStream.println();
pStream.println("aspect PrettyPrinter {");
pStream.println(" public void ASTNode.prettyPrint(String indent, PrintStream pStream) {");
pStream.println(" String childIndent = indent + \" \";");
pStream.println(" for (int i=0; i<getNumChild(); i++) {");
pStream.println(" getChild(i).prettyPrint(childIndent,pStream);");
pStream.println(" getChild(i).prettyPrint(indent,pStream);");
pStream.println(" }");
pStream.println(" }\n");
super.genPrettyPrinter(ind,pStream);
......@@ -139,8 +138,9 @@ aspect GenPrettyPrinter {
// getAttribute(i).genPrettyPrinter(ind,pStream);
// }
pStream.println(">\");");
pStream.println(" String childIndent = indent + \" \";");
pStream.println(" for (int i=0; i<getNumElement(); i++) {");
pStream.println(" getElement(i).prettyPrint(indent,pStream);");
pStream.println(" getElement(i).prettyPrint(childIndent,pStream);");
pStream.println(" }");
pStream.println(" System.out.println(indent+\"</"+name()+">\");");
pStream.println("}\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment