codegen: move ast creation to a dedicated function
gitignore: add c tpl and more explicit png rule