98 references to Context
Microsoft.CodeAnalysis.Razor.Compiler (98)
Language\Legacy\CSharpCodeParser.cs (59)
268if (Context == null) 302_tokenizer.Reset(Context.Source.Position - split.right.Content.Length); 356Context.ErrorSink.OnError(diagnostic); 410Context.ErrorSink.OnError( 416Context.ErrorSink.OnError( 422Context.ErrorSink.OnError( 466Context.ErrorSink.OnError( 486rightParen = OutputAsMetaCode(missingToken, Context.CurrentAcceptedCharacters); 608else if (At(SyntaxKind.Not) && Context.Options.AllowNullableForgivenessOperator) 723Context.ErrorSink.OnError( 749Context.CurrentAcceptedCharacters); 758Context.NullGenerateWhitespaceAndNewLine = true; 850Context.ErrorSink.OnError( 883Context.ErrorSink.OnError( 945Context.ErrorSink.OnError( 999if ((!Context.Options.AllowRazorInAllCodeBlocks && At(SyntaxKind.LeftBrace)) || 1009else if (Context.Options.AllowRazorInAllCodeBlocks && At(SyntaxKind.LeftBrace)) 1070Context.ErrorSink.OnError( 1144if (Context.InTemplateContext) 1146Context.ErrorSink.OnError( 1162Context.InTemplateContext = true; 1169Context.InTemplateContext = false; 1202var @char = Context.SourceDocument.Text[index]; 1207Context.ErrorSink.OnError( 1219if (Context.SeenDirectives.Contains(SyntaxConstants.CSharp.TagHelperPrefixKeyword)) 1316using (Context.PushNewErrorScope(directiveErrorSink)) 1343Context.ErrorSink.OnError( 1365Context.ErrorSink.OnError( 1533using (Context.PushNewErrorScope(directiveErrorSink)) 1570Context.ErrorSink.OnError( 1623Context.ErrorSink.OnError( 1637Context.ErrorSink.OnError( 1649Context.ErrorSink.OnError( 1666Context.ErrorSink.OnError( 1681Context.ErrorSink.OnError( 1696Context.ErrorSink.OnError( 1714Context.ErrorSink.OnError( 1735Context.ErrorSink.OnError( 1765Context.ErrorSink.OnError( 1788Context.ErrorSink.OnError( 1828Context.ErrorSink.OnError( 1884if (Context.Options.AllowRazorInAllCodeBlocks) 1911builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 1939if (Context.SeenDirectives.Contains(descriptor.Directive)) 1943Context.ErrorSink.OnError( 2016Context.ErrorSink.OnError( 2022Context.ErrorSink.OnError( 2052Context.ErrorSink.OnError( 2069builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 2214Context.ErrorSink.OnError( 2222Context.ErrorSink.OnError( 2230Context.ErrorSink.OnError( 2490if (!Context.Options.AllowUsingVariableDeclarations) 2492Context.ErrorSink.OnError( 2644builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 2737Context.ErrorSink.OnError( 2766if (!Context.WhiteSpaceIsSignificantToAncestorBlock && 2919Context.ErrorSink.OnError( 2996Context.ErrorSink.OnError(
Language\Legacy\HtmlMarkupParser.cs (25)
67if (Context == null) 125if (Context == null) 158Context.ErrorSink.OnError( 190if (Context == null) 336Context.ErrorSink.OnError( 438var old = Context.WhiteSpaceIsSignificantToAncestorBlock; 439Context.WhiteSpaceIsSignificantToAncestorBlock = true; 459Context.NullGenerateWhitespaceAndNewLine = false; 467Context.WhiteSpaceIsSignificantToAncestorBlock = old; 551Context.ErrorSink.OnError( 567Context.ErrorSink.OnError( 687Context.ErrorSink.OnError( 736Context.Source.Position = bookmark; 813Context.ErrorSink.OnError( 968Context.ErrorSink.OnError( 1196if (Context.Options.AllowCSharpInMarkupAttributeArea) 1233(token.Kind != SyntaxKind.Transition || !self.Context.Options.AllowCSharpInMarkupAttributeArea) && 1545Context.ErrorSink.OnError( 1628if (!Context.StartOfLine) 1700var startOfLine = Context.StartOfLine; 1751if (Context.NullGenerateWhitespaceAndNewLine) 1763Context.NullGenerateWhitespaceAndNewLine = false; 2097if (Context.Options.AllowConditionalDataDashAttributes) 2201Context.Source.Position = bookmark.AbsoluteIndex + preSequence.Content.Length; 2209Context.Source.Position = postSequenceBookmark;
Language\Legacy\ParserBase.cs (1)
12protected CancellationToken CancellationToken => Context.CancellationToken;
Language\Legacy\TokenizerBackedParser.cs (13)
53var languageTokenizer = Language.CreateTokenizer(Context.Source); 387Context.ErrorSink.OnError(diagnostic); 396Context.ErrorSink.OnError(diagnostic); 408Context.MakeMarkerNode = true; 528Context.StartOfLine = true; 532Context.StartOfLine = false; 537Context.ErrorSink.OnError(error); 610if (TokenBuilder.Count == 0 && Context.MakeMarkerNode) 657Context.CurrentAcceptedCharacters = accepted ?? AcceptedCharactersInternal.None; 664Context.MakeMarkerNode = Context.CurrentAcceptedCharacters != AcceptedCharactersInternal.Any; 671var editHandler = this.editHandlerBuilder.Build(Context.CurrentAcceptedCharacters); 722Context.CurrentAcceptedCharacters = acceptedCharacters ?? AcceptedCharactersInternal.None;