[mod] factorize print keyword handling
[mod] reuse function dump_node_list
[enh] get rid of ast for print_function detection