merge Compile methods into one compileExpr function