81 references to SourceSpan
Microsoft.CodeAnalysis.Razor.Compiler (81)
Language\DefaultDirectiveSyntaxTreePass.cs (1)
85var error = RazorDiagnosticFactory.CreateParsing_SectionsCannotBeNested(new SourceSpan(directiveStart, errorLength));
Language\Legacy\CSharpCodeParser.cs (43)
356new SourceSpan(CurrentStart, CurrentToken.Content.Length)); 414new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 420new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); 426new SourceSpan(CurrentStart, CurrentToken.Content.Length), 470new SourceSpan(block.Start, contentLength: 1 /* ( */), block.Name, ")", "(")); 727new SourceSpan(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{")); 854new SourceSpan(location, contentLength: 1 /* @ */))); 887new SourceSpan(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{")); 949new SourceSpan(CurrentStart, contentLength: 1 /* { */))); 1074new SourceSpan(CurrentStart, contentLength: 1 /* @ */))); 1166new SourceSpan(CurrentStart, contentLength: 1 /* @ */))); 1214new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 1236new SourceSpan(CurrentStart, currentDirective.Length), currentDirective)); 1260new SourceSpan(directiveStart, errorLength), 1372new SourceSpan(keywordStartLocation, keywordLength), keyword)); 1394new SourceSpan(valueStartLocation.Value, rawValue.Length), keyword)); 1483new SourceSpan(directiveLocation, Math.Max(text?.Length ?? 0, 1)), text ?? string.Empty)); 1539new SourceSpan(directiveLocation, prefix.Length), 1599new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1652new SourceSpan(CurrentStart, contentLength: 1), 1666new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1678new SourceSpan(CurrentStart, identifierLength), descriptor.Directive)); 1695new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1710new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1725new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1743new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1764new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, CurrentToken.Content, lastSeenMemberIdentifier ?? string.Empty)); 1794new SourceSpan(CurrentStart, CurrentToken.Content.Length), 1817new SourceSpan(CurrentStart, identifierLength), descriptor.Directive)); 1857new SourceSpan(CurrentStart, CurrentToken.Content.Length), 1980new SourceSpan(directiveStart, errorLength), descriptor.Directive)); 2061new SourceSpan( 2074new SourceSpan( 2189new SourceSpan(CurrentStart, contentLength: 1 /* { */), descriptor.Directive, "{")); 2195new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, "{")); 2225new SourceSpan(startingBraceLocation, contentLength: 1 /* } */), descriptor.Directive, "}", "{")); 2387new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 2395new SourceSpan(CurrentStart, contentLength: 2 /* @: */))); 2403new SourceSpan(CurrentStart, contentLength: 2 /* @@ */))); 2665new SourceSpan(block.Start, block.Name.Length))); 2910new SourceSpan(CurrentStart, CurrentToken.Content.Length), CurrentToken.Content)); 3092new SourceSpan(start, contentLength: 1 /* { OR } */), 3197new SourceSpan(start, contentLength: 1 /* { OR } */),
Language\Legacy\HtmlMarkupParser.cs (9)
179new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 356new SourceSpan( 571new SourceSpan(SourceLocationTracker.Advance(endTagStartLocation, "</"), Math.Max(endTagName.Length, 1)), endTagName)); 587new SourceSpan( 688new SourceSpan(tagStartLocation, contentLength: 1))); 719new SourceSpan( 845new SourceSpan(textLocation, contentLength: 4 /* text */))); 997new SourceSpan(textLocation, contentLength: 4 /* text */))); 1575new SourceSpan(SourceLocationTracker.Advance(tagStart, "</"), ScriptTagName.Length),
Language\Legacy\NativeCSharpTokenizer.cs (3)
561new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); 591new SourceSpan(CurrentStart, contentLength: 1 /* " */))); 608new SourceSpan(CurrentStart, contentLength: 1 /* end of file */)));
Language\Legacy\RoslynCSharpTokenizer.cs (5)
393new SourceSpan(CurrentStart, contentLength: expectedPrefix?.Length ?? 0 /* " */))); 500new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); 528new SourceSpan(CurrentStart, contentLength: trivia.FullSpan.Length))); 546new SourceSpan(CurrentStart, contentLength: trivia.FullSpan.Length))); 556new SourceSpan(CurrentStart, contentLength: directiveTrivia.FullSpan.Length)));
Language\Legacy\TagHelperBlockRewriter.cs (3)
113var location = new SourceSpan(codeBlock.GetSourceLocation(source), codeBlock.Width); 190var errorLocation = new SourceSpan(attributeNameLocation, result.AttributeName.Length); 200var errorLocation = new SourceSpan(attributeNameLocation, result.AttributeName.Length);
Language\Legacy\TagHelperParseTreeRewriter.cs (9)
142var source = new SourceSpan(SourceLocationTracker.Advance(startTag.GetSourceLocation(_source), "<"), tagName.Length); 187new SourceSpan(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length), tagName)); 368new SourceSpan(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length), 493new SourceSpan(tagBlock.GetSourceLocation(_source), tagBlock.Width), 515new SourceSpan(errorStart, tagName.Length), tagName)); 532new SourceSpan(errorStart, tagName.Length), tagName)); 587new SourceSpan(errorStart, length), 705new SourceSpan(errorStart, tagName.Length), 723new SourceSpan(errorStart, tagName.Length),
Language\Legacy\TokenizerBackedParser.cs (2)
385new SourceSpan(start, contentLength: 2 /* @* */)); 395new SourceSpan(start, contentLength: 2 /* @* */));
Language\SourceSpan.cs (1)
14public static readonly SourceSpan Undefined = new SourceSpan(SourceLocation.Undefined, 0);
Mvc\RazorExtensionsDiagnosticFactory.cs (5)
22new SourceSpan(SourceLocation.Undefined, contentLength: 0), 35new SourceSpan(SourceLocation.Undefined, contentLength: 0), 48new SourceSpan(SourceLocation.Undefined, contentLength: 0), 61new SourceSpan(SourceLocation.Undefined, contentLength: 0), 73new SourceSpan(SourceLocation.Undefined, contentLength: 0),