I think I'd prefer if we changed `popScope` to:
```java
private void popScope(Scope... expected) {
  if (!EnumSet.of(expected).contains(scopes.pop()) {
    throw new IllegalStateException();
  }
}
```
so that you could just make this:
```java
popScope(Scope.TYPE_DECLARATION, Scope.INTERFACE_DECLARATION);
```