popOpenElementsUntil method

void popOpenElementsUntil(
  1. EndTagToken token
)

Helper method for popping openElements.

Implementation

void popOpenElementsUntil(EndTagToken token) {
  final name = token.name;
  var node = tree.openElements.removeLast();
  while (node.localName != name) {
    node = tree.openElements.removeLast();
  }
  node.endSourceSpan = token.span;
}