acceptVariants method

void acceptVariants()

Advances, collecting subtags in _acceptedList, as long as the current subtag is a variant subtag.

Does not return a boolean: when done, _acceptedList will contain the collected subtags.

Implementation

void acceptVariants() {
  _acceptedList = [];
  while (!atEnd() && _variantRegExp.hasMatch(_current)) {
    _acceptedList!.add(_current);
    advance();
  }
}