Abstracting out, visit_Program, visit_Subroutine, visit_Function, state variables from passes

Gagandeep Singh requested to merge czgdp18071/lfortran:refactor_2 into master

I noticed that above three methods and some state variables are common among all the passes and hence I abstracted them out to the topmost class, PassVisitor to avoid repetition of the same code several times.

Overall, its just cut and paste in the pass folder. Semantics of the code are still the same as reflected from no change in tests.

Edited by Gagandeep Singh

Merge request reports