dumpAST function