anchor.diff:            Token saved = token;
             commitType();
             token = saved;
  +          // We need to recompute the before tokens because [commitType] can
  +          // cause synthetic tokens to be inserted.
  +          beforeToken = previousToken(beforeToken, token);
  +          beforeNameToken = previousToken(beforeNameToken, nameToken);
           }
   
           if (nameContext != null) {
  -          nameToken = ensureIdentifier(nameToken, nameContext);
  +          nameToken = ensureIdentifier(beforeNameToken.next, nameContext);
  +          // We need to recompute the before tokens because [ensureIdentifier]
  +          // can cause synthetic tokens to be inserted.
  +          beforeToken = previousToken(beforeToken, token);
  +          beforeNameToken = previousToken(beforeNameToken, nameToken);
           } else {
             listener.handleNoName(nameToken);
           }
  
positive.code:         }
          listener.endFormalParameter(
              thisKeyword, periodAfterThis, nameToken, parameterKind, memberKind);
  
          // TODO(brianwilkerson): Remove the invocation of `previous` when this
          // method accepts the last consumed token.
          return token.previous;
      }
  
      throw "Internal error: Unhandled continuation '$continuation'.";
  
negative.code:     /// True if we've seen the `var` keyword.
      bool hasVar = false;
  
      /// The token before [token].
      Token beforeToken;
  
      /// The token before the `begin` token.
      Token beforeBegin;
  
  