Create codeGen.cpp

will finish processEnd and test tomorrow