anchor.diff:    /// open parenthesis. If [insertIdentifier] is true, then a synthetic
     /// identifier is included between the open and close parenthesis.
     Token insertParens(Token token, bool includeIdentifier) {
  -    // Assert that the token is not eof, though allow an eof-token if the offset
  +    // Throw if the token is eof, though allow an eof-token if the offset
       // is negative. The last part is because [syntheticPreviousToken] sometimes
       // creates eof tokens that aren't the real eof-token that has a negative
       // offset (which wouldn't be valid for the real eof).
  -    assert(!token.isEof || token.offset < 0);
  +    if (!(!token.isEof || token.offset < 0)) {
  +      // Inserting here could cause a infinite loop. We prefer to crash.
  +      throw 'Internal Error: Rewriting at eof.';
  +    }
  +
       Token next = token.next!;
       int offset = next.charOffset;
       BeginToken leftParen =
  
positive.code:   /// Move [endGroup] (a synthetic `)`, `]`, or `}` token) and associated
    /// error token after [token] in the token stream and return [endGroup].
    Token moveSynthetic(Token token, Token endGroup) {
      // Assert that the token is not eof, though allow an eof-token if the offset
      // is negative. The last part is because [syntheticPreviousToken] sometimes
      // creates eof tokens that aren't the real eof-token that has a negative
      // offset (which wouldn't be valid for the real eof).
      assert(!token.isEof || token.offset < 0);
      // ignore:unnecessary_null_comparison
      assert(endGroup.beforeSynthetic != null);
      if (token == endGroup) return endGroup;
  
negative.code: 
    /// Insert [newToken] after [token] and return [newToken].
    Token insertToken(Token token, Token newToken) {
      // Throw if the token is eof, though allow an eof-token if the offset
      // is negative. The last part is because [syntheticPreviousToken] sometimes
      // creates eof tokens that aren't the real eof-token that has a negative
      // offset (which wouldn't be valid for the real eof).
      if (!(!token.isEof || token.offset < 0)) {
        // Inserting here could cause a infinite loop. We prefer to crash.
        throw 'Internal Error: Rewriting at eof.';
      }
  
      _setNext(newToken, token.next!);
  
      // A no-op rewriter could skip this step.
  