 } else {
        &#47;&#47; Found a single colon. Parse [partStart..i] as a hex entry.
        parts.add(parseHex(partStart, i));
      }
      partStart = i + 1;
    } else if (char == _DOT) {
      seenDot = true;
    }
  }
  if (parts.length == 0) error(&#39;too few parts&#39;);
  bool atEnd = (partStart == end);
  bool isLastWildcard = (parts.last == -1);
  if (atEnd &amp;&amp; !isLastWildcard) {
    error(&#39;expected a part after last `:`&#39;, end);
  }
  if (!atEnd) {
    if (!seenDot) {
      par