popUntil method

void popUntil(
  1. String name
)

Call pop repeatedly until the name of the current scope is the same as name.

Implementation

void popUntil(String name) {
  while (current.name != name && current.name != rootName) {
    pop();
  }
}