Search in sources :

Example 1 with EmptyFormatter

use of abs.frontend.tests.EmptyFormatter in project abstools by abstools.

the class OtherAnalysisTests method prettyPrint.

public static String prettyPrint(Model m2) {
    StringWriter writer = new StringWriter();
    PrintWriter w = new PrintWriter(writer);
    ABSFormatter f = new EmptyFormatter();
    m2.doPrettyPrint(w, f);
    return writer.toString();
}
Also used : EmptyFormatter(abs.frontend.tests.EmptyFormatter) StringWriter(java.io.StringWriter) ABSFormatter(abs.frontend.tests.ABSFormatter) PrintWriter(java.io.PrintWriter)

Example 2 with EmptyFormatter

use of abs.frontend.tests.EmptyFormatter in project abstools by abstools.

the class PrettyPrinterTests method prettyPrint.

private String prettyPrint(ASTNode<?> d) {
    StringWriter writer = new StringWriter();
    PrintWriter w = new PrintWriter(writer);
    ABSFormatter f = new EmptyFormatter();
    d.doPrettyPrint(w, f);
    return writer.toString();
}
Also used : EmptyFormatter(abs.frontend.tests.EmptyFormatter) StringWriter(java.io.StringWriter) ABSFormatter(abs.frontend.tests.ABSFormatter) PrintWriter(java.io.PrintWriter)

Aggregations

ABSFormatter (abs.frontend.tests.ABSFormatter)2 EmptyFormatter (abs.frontend.tests.EmptyFormatter)2 PrintWriter (java.io.PrintWriter)2 StringWriter (java.io.StringWriter)2