1 type derived from SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (1)
Errors\XmlSyntaxDiagnosticInfo.cs (1)
11internal sealed class XmlSyntaxDiagnosticInfo : SyntaxDiagnosticInfo
18 instantiations of SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (18)
Errors\SyntaxDiagnosticInfo.cs (1)
52return 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 (4)
1007SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1054SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1097SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1305new SyntaxDiagnosticInfo(ErrorCode.ERR_TypeParamMustBeIdentifier), $"{(int)ErrorCode.ERR_TypeParamMustBeIdentifier:d4}");
Parser\Lexer.cs (2)
2013var error = new SyntaxDiagnosticInfo(offset: 0, width: 1, code: ErrorCode.ERR_BadDirectivePlacement); 4842return new SyntaxDiagnosticInfo(start - TextWindow.LexemeStartPosition,
Parser\SyntaxParser.cs (7)
662return new SyntaxDiagnosticInfo(offset, width, code, SyntaxFacts.GetText(expected)); 666return new SyntaxDiagnosticInfo(offset, width, code, /*unused*/string.Empty, SyntaxFacts.GetText(actual)); 670return new SyntaxDiagnosticInfo(offset, width, code); 875return new SyntaxDiagnosticInfo(offset, width, code); 880return new SyntaxDiagnosticInfo(offset, width, code, args); 885return new SyntaxDiagnosticInfo(node.GetLeadingTriviaWidth(), node.Width, code, args); 890return new SyntaxDiagnosticInfo(code, args);
68 references to SyntaxDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (68)
Errors\SyntaxDiagnosticInfo.cs (2)
39public SyntaxDiagnosticInfo WithOffset(int offset) 44protected 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)
790protected override SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual, int offset, int length) 795SyntaxDiagnosticInfo rawInfo = base.GetExpectedTokenError(expected, actual, offset, length); 796SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 810protected override SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual) 1007SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1008SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1054SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1055SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1097SyntaxDiagnosticInfo rawInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.ERR_OvlOperatorExpected); 1098SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code);
Parser\LanguageParser.cs (4)
3833SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_BadOperatorSyntax, SyntaxFacts.GetText(SyntaxKind.PlusToken)); 3882SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlUnaryOperatorExpected); 3890SyntaxDiagnosticInfo diagInfo = MakeError(opTokenErrorOffset, opTokenErrorWidth, ErrorCode.ERR_OvlBinaryOperatorExpected); 3898SyntaxDiagnosticInfo 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( 483var sd = (SyntaxDiagnosticInfo)info;
Parser\Lexer.cs (12)
338private SyntaxToken Create(in TokenInfo info, SyntaxListBuilder? leading, SyntaxListBuilder? trailing, SyntaxDiagnosticInfo[]? errors) 712NextCharOrUnicodeEscape(out _, out var error); 1560SyntaxDiagnosticInfo? error; 1584SyntaxDiagnosticInfo? error; 1722SyntaxDiagnosticInfo? error; 2013var error = new SyntaxDiagnosticInfo(offset: 0, width: 1, code: ErrorCode.ERR_BadDirectivePlacement); 2697SyntaxDiagnosticInfo? error; 4600SyntaxDiagnosticInfo? info; 4607private char NextCharOrUnicodeEscape(out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 4626private char NextUnicodeEscape(out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 4631private char ScanUnicodeEscape(bool peek, out char surrogateCharacter, out SyntaxDiagnosticInfo? info) 4840private SyntaxDiagnosticInfo CreateIllegalEscapeDiagnostic(int start)
Parser\Lexer_StringLiteral.cs (5)
180SyntaxDiagnosticInfo? error; 273out var error, 283out SyntaxDiagnosticInfo? error, 347public SyntaxDiagnosticInfo? Error = null; 367private void TrySetError(SyntaxDiagnosticInfo error)
Parser\SyntaxParser.cs (15)
657protected virtual SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual, int offset, int width) 674protected virtual SyntaxDiagnosticInfo GetExpectedTokenError(SyntaxKind expected, SyntaxKind actual) 873protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code) 878protected static SyntaxDiagnosticInfo MakeError(int offset, int width, ErrorCode code, params object[] args) 883protected static SyntaxDiagnosticInfo MakeError(GreenNode node, ErrorCode code, params object[] args) 888protected static SyntaxDiagnosticInfo MakeError(ErrorCode code, params object[] args) 941SyntaxDiagnosticInfo diagnostic = null; 966var d = (SyntaxDiagnosticInfo)tokenDiagnostics[i]; 976var existing = (SyntaxDiagnosticInfo)token.GetDiagnostics().FirstOrDefault(); 990var existing = (SyntaxDiagnosticInfo)node.GetDiagnostics().FirstOrDefault(); 1019var d = (SyntaxDiagnosticInfo)targetDiagnostics[i];
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (2)
72SyntaxDiagnosticInfo oldSyntaxDiagnostic = oldDiagnostic as SyntaxDiagnosticInfo;
Syntax\SyntaxTreeDiagnosticEnumerator.cs (2)
54var sdi = (SyntaxDiagnosticInfo)diags[diagIndex];