As long as my parents entered USA legally, they can apply for greencards in USA as immediate relatives of a USA citizen, regardless whether they are in status or not at the time of filing their application. It has nothing to do when I get my citizenship.
The key is thus to keep I-94 as a prrof that they entered USA legally.
The immediate relative category also includes spouse and children (under 21) of a USA citizen.