1 type derived from SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (1)
Errors\XmlSyntaxDiagnosticInfo.cs (1)
11internal sealed class XmlSyntaxDiagnosticInfo : SyntaxDiagnosticInfo
30 instantiations of SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (27)
Errors\SyntaxDiagnosticInfo.cs (3)
15ObjectBinder.RegisterTypeReader(typeof(SyntaxDiagnosticInfo), r => new SyntaxDiagnosticInfo(r)); 46return new SyntaxDiagnosticInfo(offset, this.Width, (ErrorCode)this.Code, this.Arguments); 57return new SyntaxDiagnosticInfo(this, severity);
Parser\AbstractLexer.cs (4)
117return new SyntaxDiagnosticInfo(offset, width, code); 123return new SyntaxDiagnosticInfo(offset, width, code, args); 139return new SyntaxDiagnosticInfo(code); 144return new SyntaxDiagnosticInfo(code, args);
Parser\DocumentationCommentParser.cs (8)
801SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1012SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1013SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1059SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1060SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1102SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1103SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1295new SyntaxDiagnosticInfo(ErrorCode.ERR_TypeParamMustBeIdentifier), $"{(int)ErrorCode.ERR_TypeParamMustBeIdentifier:d4}");
Parser\SlidingTextWindow.cs (1)
658return new SyntaxDiagnosticInfo(start - this.LexemeStartPosition,
Parser\SyntaxParser.cs (10)
626return new SyntaxDiagnosticInfo(offset, width, code, SyntaxFacts.GetText(expected)); 630return new SyntaxDiagnosticInfo(offset, width, code, /*unused*/string.Empty, SyntaxFacts.GetText(actual)); 634return new SyntaxDiagnosticInfo(offset, width, code); 833return new SyntaxDiagnosticInfo(offset, width, code); 838return new SyntaxDiagnosticInfo(offset, width, code, args); 843return new SyntaxDiagnosticInfo(node.GetLeadingTriviaWidth(), node.Width, code, args); 848return new SyntaxDiagnosticInfo(code, args); 918tokenDiagnostics[i] = new SyntaxDiagnosticInfo(d.Offset - leadingWidth, d.Width, (ErrorCode)d.Code, d.Arguments); 971targetDiagnostics[i] = new SyntaxDiagnosticInfo(d.Offset + triviaWidth, d.Width, (ErrorCode)d.Code, d.Arguments); 985new SyntaxDiagnosticInfo(newOffset, diagnostic.Width, (ErrorCode)diagnostic.Code, diagnostic.Arguments)
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (1)
75new SyntaxDiagnosticInfo(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\DiagnosticTest.cs (1)
121verifyWithSeverity(new SyntaxDiagnosticInfo(1, 2, ErrorCode.ERR_DuplicateTypeParameter, args));
Diagnostics\LocationsTests.cs (2)
557var nodeWithBadError = node.Green.WithDiagnosticsGreen(new DiagnosticInfo[] { new SyntaxDiagnosticInfo(10, 10, ErrorCode.ERR_NoBaseClass) }).CreateRed(); 586var nodeWithBadError = SyntaxFactory.IdentifierName(new SyntaxToken(node.Node.WithDiagnosticsGreen(new DiagnosticInfo[] { new SyntaxDiagnosticInfo(10, 10, ErrorCode.ERR_NoBaseClass) })));
68 references to SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (68)
Errors\SyntaxDiagnosticInfo.cs (3)
15ObjectBinder.RegisterTypeReader(typeof(SyntaxDiagnosticInfo), r => new SyntaxDiagnosticInfo(r)); 44public SyntaxDiagnosticInfo WithOffset(int offset) 49protected SyntaxDiagnosticInfo(SyntaxDiagnosticInfo original, DiagnosticSeverity severity) : base(original, severity)
Parser\AbstractLexer.cs (9)
17private List<SyntaxDiagnosticInfo>? _errors; 40protected SyntaxDiagnosticInfo[]? GetErrors(int leadingTriviaWidth) 46var array = new SyntaxDiagnosticInfo[_errors.Count]; 101protected void AddError(SyntaxDiagnosticInfo? error) 107_errors = new List<SyntaxDiagnosticInfo>(8); 114protected SyntaxDiagnosticInfo MakeError(int position, int width, ErrorCode code) 120protected SyntaxDiagnosticInfo MakeError(int position, int width, ErrorCode code, params object[] args) 137protected static SyntaxDiagnosticInfo MakeError(ErrorCode code) 142protected static SyntaxDiagnosticInfo MakeError(ErrorCode code, params object[] args)
Parser\DocumentationCommentParser.cs (10)
795protected override SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual, int offset, int length) 800SyntaxDiagnosticInfo rawInfo = base.GetExpectedTokenError(expected, actual, offset, length); 801SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 815protected override SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual) 1012SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1013SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1059SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1060SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1102SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1103SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code);
Parser\LanguageParser.cs (4)
3489SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_BadOperatorSyntax, SyntaxFacts.GetText(SyntaxKind.PlusToken)); 3537SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlUnaryOperatorExpected); 3545SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlBinaryOperatorExpected); 3553SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlOperatorExpected);
Parser\LanguageParser_InterpolatedString.cs (7)
51rescanInterpolation(out var kind, out var error, out var openQuoteRange, interpolations, out var closeQuoteRange); 71void rescanInterpolation(out Lexer.InterpolatedStringKind kind, out SyntaxDiagnosticInfo? error, out Range openQuoteRange, ArrayBuilder<Lexer.Interpolation> interpolations, out Range closeQuoteRange) 115var indentationError = getInterpolationIndentationError(indentationWhitespace, interpolation); 176SyntaxDiagnosticInfo? indentationError = null; 277SyntaxDiagnosticInfo? getInterpolationIndentationError( 481var sd = (SyntaxDiagnosticInfo)info;
Parser\Lexer.cs (6)
336private SyntaxToken Create(in TokenInfo info, SyntaxListBuilder? leading, SyntaxListBuilder? trailing, SyntaxDiagnosticInfo[]? errors) 906SyntaxDiagnosticInfo? error; 1872SyntaxDiagnosticInfo? error; 1896SyntaxDiagnosticInfo? error; 2044SyntaxDiagnosticInfo? error; 3027SyntaxDiagnosticInfo? error;
Parser\Lexer_StringLiteral.cs (5)
173SyntaxDiagnosticInfo? error; 266out var error, 276out SyntaxDiagnosticInfo? error, 340public SyntaxDiagnosticInfo? Error = null; 360private void TrySetError(SyntaxDiagnosticInfo error)
Parser\SlidingTextWindow.cs (5)
396SyntaxDiagnosticInfo? info; 403public char NextCharOrUnicodeEscape(out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 422public char NextUnicodeEscape(out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 427private char ScanUnicodeEscape(bool peek, out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 656private SyntaxDiagnosticInfo CreateIllegalEscapeDiagnostic(int start)
Parser\SyntaxParser.cs (15)
621protected virtual SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual, int offset, int width) 638protected virtual SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual) 831protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code) 836protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code, params object[] args) 841protected static SyntaxDiagnosticInfo MakeError(GreenNode node, ErrorCode code, params object[] args) 846protected static SyntaxDiagnosticInfo MakeError(ErrorCode code, params object[] args) 892SyntaxDiagnosticInfo diagnostic = null; 917var d = (SyntaxDiagnosticInfo)tokenDiagnostics[i]; 927var existing = (SyntaxDiagnosticInfo)token.GetDiagnostics().FirstOrDefault(); 941var existing = (SyntaxDiagnosticInfo)node.GetDiagnostics().FirstOrDefault(); 970var d = (SyntaxDiagnosticInfo)targetDiagnostics[i];
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (2)
72SyntaxDiagnosticInfo oldSyntaxDiagnostic = oldDiagnostic as SyntaxDiagnosticInfo;
Syntax\SyntaxTreeDiagnosticEnumerator.cs (2)
54var sdi = (SyntaxDiagnosticInfo)diags[diagIndex];