Memoize comment scope selector