111 references to SourceSpan
Microsoft.AspNetCore.Razor.Language.UnitTests (34)
DefaultRazorTagHelperBinderPhaseTest.cs (8)
29new SourceSpan(new SourceLocation(14 + Environment.NewLine.Length, 1, 14), contentLength: 1)), 31new SourceSpan(new SourceLocation(14 + Environment.NewLine.Length, 1, 14), contentLength: 1), "\"") 58new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), 60new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "\"") 87new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), 89new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "tagHelperPrefix", '\"', "\""), 478new SourceSpan(SourceLocation.Zero, contentLength: 1)); 480new SourceSpan(new SourceLocation((Environment.NewLine.Length * 2) + 30, 2, 1), contentLength: 4), "form");
Legacy\CSharpCodeParserTest.cs (2)
24new SourceSpan(directiveLocation, length), SyntaxConstants.CSharp.TagHelperPrefixKeyword, character, prefix); 170new SourceSpan(new SourceLocation(1, 2, 3), errorLength), directiveText);
SourceSpanTest.cs (24)
18new SourceSpan(new SourceLocation(1, 2, 3), 4), 19new SourceSpan(new SourceLocation(5, 6, 7), 8)); 22new SourceSpan(new SourceLocation(1, 2, 3), 4), 23new SourceSpan(new SourceLocation(5, 6, 7), 8)); 36new SourceSpan(new SourceLocation(1, 2, 3), 4), 37new SourceSpan(new SourceLocation(5, 6, 7), 8)); 40new SourceSpan(new SourceLocation(1, 2, 3), 5), 41new SourceSpan(new SourceLocation(5, 6, 7), 9)); 52new SourceSpan(new SourceLocation(1, 2, 3), 4), 53new SourceSpan(new SourceLocation(5, 6, 7), 8)); 56new SourceSpan(new SourceLocation(1, 2, 3), 4), 57new SourceSpan(new SourceLocation(5, 6, 8), 8)); 68new SourceSpan(new SourceLocation(1, 2, 3), 4), 69new SourceSpan(new SourceLocation(5, 6, 8), 8)); 72new SourceSpan(new SourceLocation(1, 2, 3), 4), 73new SourceSpan(new SourceLocation(5, 6, 7), 8)); 84new SourceSpan(new SourceLocation(1, 2, 3), 4), 85new SourceSpan(new SourceLocation(5, 5, 7), 8)); 88new SourceSpan(new SourceLocation(1, 1, 3), 4), 89new SourceSpan(new SourceLocation(5, 6, 7), 8)); 100new SourceSpan(new SourceLocation(1, 2, 3), 4), 101new SourceSpan(new SourceLocation(4, 6, 7), 8)); 104new SourceSpan(new SourceLocation(1, 2, 3), 4), 105new SourceSpan(new SourceLocation(5, 6, 7), 9));
Microsoft.CodeAnalysis.Razor.Compiler (77)
Language\DefaultDirectiveSyntaxTreePass.cs (1)
85var error = RazorDiagnosticFactory.CreateParsing_SectionsCannotBeNested(new SourceSpan(directiveStart, errorLength));
Language\Legacy\CSharpCodeParser.cs (40)
354new SourceSpan(CurrentStart, CurrentToken.Content.Length)); 412new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 418new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); 424new SourceSpan(CurrentStart, CurrentToken.Content.Length), 468new SourceSpan(block.Start, contentLength: 1 /* ( */), block.Name, ")", "(")); 725new SourceSpan(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{")); 852new SourceSpan(location, contentLength: 1 /* @ */))); 890new SourceSpan(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{")); 952new SourceSpan(CurrentStart, contentLength: 1 /* { */))); 1077new SourceSpan(CurrentStart, contentLength: 1 /* @ */))); 1153new SourceSpan(CurrentStart, contentLength: 1 /* @ */))); 1214new SourceSpan(CurrentStart, currentDirective.Length), currentDirective)); 1238new SourceSpan(directiveStart, errorLength), 1350new SourceSpan(keywordStartLocation, keywordLength), keyword)); 1372new SourceSpan(valueStartLocation.Value, rawValue.Length), keyword)); 1461new SourceSpan(directiveLocation, Math.Max(text?.Length ?? 0, 1)), text ?? string.Empty)); 1517new SourceSpan(directiveLocation, prefix.Length), 1577new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1630new SourceSpan(CurrentStart, contentLength: 1), 1644new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1656new SourceSpan(CurrentStart, identifierLength), descriptor.Directive)); 1673new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1688new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1703new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1721new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive)); 1742new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, CurrentToken.Content, lastSeenMemberIdentifier ?? string.Empty)); 1772new SourceSpan(CurrentStart, CurrentToken.Content.Length), 1795new SourceSpan(CurrentStart, identifierLength), descriptor.Directive)); 1835new SourceSpan(CurrentStart, CurrentToken.Content.Length), 1950new SourceSpan(directiveStart, errorLength), descriptor.Directive)); 2023new SourceSpan(CurrentStart, contentLength: 1 /* { */), descriptor.Directive, "{")); 2029new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, "{")); 2059new SourceSpan(startingBraceLocation, contentLength: 1 /* } */), descriptor.Directive, "}", "{")); 2221new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 2229new SourceSpan(CurrentStart, contentLength: 2 /* @: */))); 2237new SourceSpan(CurrentStart, contentLength: 2 /* @@ */))); 2499new SourceSpan(block.Start, block.Name.Length))); 2747new SourceSpan(CurrentStart, CurrentToken.Content.Length), CurrentToken.Content)); 2930new SourceSpan(start, contentLength: 1 /* { OR } */), 3007new SourceSpan(start, contentLength: 1 /* { OR } */),
Language\Legacy\HtmlMarkupParser.cs (8)
160new SourceSpan(CurrentStart, CurrentToken.Content.Length))); 338new SourceSpan( 559new SourceSpan(SourceLocationTracker.Advance(endTagStartLocation, "</"), Math.Max(endTagName.Length, 1)), endTagName)); 575new SourceSpan( 695new SourceSpan( 821new SourceSpan(textLocation, contentLength: 4 /* text */))); 976new SourceSpan(textLocation, contentLength: 4 /* text */))); 1553new 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),