add code generator

This is WIP: only AST done
codegen: move ast creation to a dedicated function
gitignore: add c tpl and more explicit png rule