Print function for AST