Select Git revision
PrettyPrinter.jrag
-
Anders Nilsson authored
grammar generation before it can be tested though.
Anders Nilsson authoredgrammar generation before it can be tested though.
PrettyPrinter.jrag 487 B
// -*-Java-*-
/*
* Copyright (C) 2007 Anders Nilsson <anders.nilsson@cs.lth.se>
*
* This file is part of XmlSchemaCompiler.
*/
import java.io.PrintStream;
aspect PrettyPrinter {
public void ASTNode.prettyPrint(String ind, PrintStream pStream) {
for (int i=0; i<getNumChild(); i++) {
getChild(i).prettyPrint(ind,pStream);
}
}
public void XsElement.prettyPrint(String ind, PrintStream pStream) {
if (hasName()) {
pStream.println(ind+"Element: "+name());
}
}
}