public static void dumpAST(PrintWriter printer, Tree ast, int ident) {
char[] identChars = new char[ident];
Arrays.fill(identChars, ' ');
if (ast == null) {
renderNode(identChars, null, printer);
return;
}
for (int i = 0; i < ast.getChildCount(); i++) {
Tree node = ast.getChild(i);
if (node == null) {
throw new NullPointerException("Null AST node");
}
renderNode(identChars, node, printer);
dumpAST(printer, node, ident + 2);
}
}
ASTUtil.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:esper
作者:
评论列表
文章目录