isSuperselector method

bool isSuperselector(
  1. SimpleSelector other
)
override

Whether this is a superselector of other.

That is, whether this matches every element that other matches, as well as possibly additional elements.

Implementation

bool isSuperselector(SimpleSelector other) {
  if (namespace == '*') return true;
  if (other is TypeSelector) return namespace == other.name.namespace;
  if (other is UniversalSelector) return namespace == other.namespace;
  return namespace == null || super.isSuperselector(other);
}