implemented code generation for expressions, functions and ifs