Skip to content
Snippets Groups Projects
Commit b5c00d58 authored by Johannes Mey's avatar Johannes Mey
Browse files

add option to print the first line of an AST (for test output)

parent 2295a773
No related branches found
No related tags found
No related merge requests found
......@@ -91,4 +91,14 @@ aspect Debug {
}
return b;
}
}
\ No newline at end of file
protected String ASTNode.getPrettyPrintLine() {
PrettyPrinter sw = new PrettyPrinter(" ", false);
try {
this.prettyPrint(sw);
return sw.toString().trim().split("\n")[0];
} catch (RuntimeException e) {
return e.getMessage();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment