anchor.diff:      FormalParameter parameter =
           parser.parseFormalParameterList(inFunctionType: true).parameters[0];
       expectNotNullIfNoErrors(parameter);
  -    listener.assertErrorsWithCodes([
  -      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
  -      ParserErrorCode.MISSING_NAME_FOR_NAMED_PARAMETER
  +    listener.assertErrors([
  +      expectedError(ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE, 8, 1),
  +      expectedError(ParserErrorCode.MISSING_NAME_FOR_NAMED_PARAMETER, 7, 1)
       ]);
       expect(parameter.identifier, isNotNull);
     }
  
positive.code:     createParser("if (a == 'x \$y z') 'a.dart'");
      Configuration configuration = parser.parseConfiguration();
      expectNotNullIfNoErrors(configuration);
      listener.assertErrorsWithCodes(
          [ParserErrorCode.INVALID_LITERAL_IN_CONFIGURATION]);
    }
  
    void test_invalidOperator() {
      createParser('void operator ===(x) {}');
      ClassMember member = parser.parseClassMember('C');
      expectNotNullIfNoErrors(member);
      listener.assertErrorsWithCodes([ParserErrorCode.INVALID_OPERATOR]);
    }
  
    void test_invalidOperatorAfterSuper_assignableExpression() {
      Expression expression = parseAssignableExpression('super?.v', false);
      expectNotNullIfNoErrors(expression);
      listener
          .assertErrorsWithCodes([ParserErrorCode.INVALID_OPERATOR_FOR_SUPER]);
    }
  
    void test_invalidOperatorAfterSuper_primaryExpression() {
      Expression expression = parsePrimaryExpression('super?.v');
      expectNotNullIfNoErrors(expression);
      listener
          .assertErrorsWithCodes([ParserErrorCode.INVALID_OPERATOR_FOR_SUPER]);
    }
  
    void test_invalidOperatorForSuper() {
      createParser('++super');
      Expression expression = parser.parseUnaryExpression();
      expectNotNullIfNoErrors(expression);
      listener
          .assertErrorsWithCodes([ParserErrorCode.INVALID_OPERATOR_FOR_SUPER]);
    }
  
    void test_invalidStarAfterAsync() {
      createParser('async* => 0;');
      FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
      expectNotNullIfNoErrors(functionBody);
      listener.assertErrorsWithCodes([ParserErrorCode.INVALID_STAR_AFTER_ASYNC]);
    }
  
    void test_invalidSync() {
      createParser('sync* => 0;');
      FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
      expectNotNullIfNoErrors(functionBody);
      listener.assertErrorsWithCodes([ParserErrorCode.INVALID_SYNC]);
    }
  
    void test_invalidTopLevelVar() {
  
negative.code:   }
  
    void test_missingAssignableSelector_prefix_minusMinus_literal() {
      parseExpression("--0", errors: [
        expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 2, 1)
      ]);
    }
  
    void test_missingAssignableSelector_prefix_plusPlus_literal() {
      parseExpression("++0", errors: [
        expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 2, 1)
      ]);
    }
  
    void test_missingAssignableSelector_selector() {
  