Maybe I posted too soon.
When you say "even if your parents are here legally," there are degrees of being here legally.
A tourist is here legally, if only on a six-month nonimmigrant visa. But the tourist attests that they have a permanent domicile in their home country that they have no intention of abandoning.
A permanent resident alien is also here legally, but that person attests that they are abandoning their home country domicile with no intention of returning, and are establishing a new permanent domicile in the United States.
The Supreme Court in Wong ruled on the latter case, and was silent on the former case.
-PJ
Fair enough - I can see the “domicile” or even “reside in” argument excluding those with a temporary visa.
Not to split hairs, but reading Wong Kim Ark, I see no language about the legal vs. illegal status of the respondent’s parents.