private void ParserErrorHandler(object sender, ParserErrorEventArgs e) { if (e.ErrorType == ParserErrorType.Error) { _hadParseError = true; } // We raise the error event further, // but the sender is changed to this compiler because it's the facade for the implementation detail of the parser. OnParserError(e); }
protected virtual void OnParserError(ParserErrorEventArgs e) { var handler = ParserError; handler?.Invoke(this, e); }