An effective field theory calculation of the QCD corrections to weak parameters