private function filterPragmasByToken($token, Pragma\PragmaCollection $pragmas, array $scopedPragmas)
    {
        foreach ($pragmas as $pragma) {
            if (in_array($pragma->getName(), $scopedPragmas, true)
                && $pragma->handlesToken($token)
            ) {
                yield $pragma;
            }
        }
    }