PrintAst refactoring.