1 instantiation of None
Microsoft.CodeAnalysis.Workspaces (1)
PatternMatching\RegexQuery.cs (1)
84public static readonly None Instance = new();
32 references to None
Microsoft.CodeAnalysis.Features (10)
NavigateTo\RegexQueryCompiler.cs (10)
24/// quantifiers) produce <see cref="RegexQuery.None"/>, which means "I can't tell — don't reject 25/// on my account." If the entire compiled tree is <see cref="RegexQuery.None"/> (e.g. for <c>.*</c>), 55/// <see cref="RegexQuery.None"/> nodes survive optimization (see 74RegexWildcardNode => RegexQuery.None.Instance, 87RegexZeroOrMoreQuantifierNode => RegexQuery.None.Instance, 88RegexZeroOrOneQuantifierNode => RegexQuery.None.Instance, 106_ => RegexQuery.None.Instance, 152return RegexQuery.None.Instance; 161return RegexQuery.None.Instance; 172return RegexQuery.None.Instance;
Microsoft.CodeAnalysis.Features.UnitTests (9)
NavigateTo\RegexQueryCompilerTests.cs (9)
201RegexQuery.None.Instance, 217RegexQuery.None.Instance, 221Assert.IsType<RegexQuery.None>(optimized); 243var query = new RegexQuery.All([RegexQuery.None.Instance, RegexQuery.None.Instance]); 245Assert.IsType<RegexQuery.None>(optimized); 277Assert.False(RegexQuery.None.Instance.HasLiterals); 283var query = new RegexQuery.All([new RegexQuery.Literal("goo"), RegexQuery.None.Instance]); 297var query = new RegexQuery.All([RegexQuery.None.Instance]);
Microsoft.CodeAnalysis.Workspaces (13)
PatternMatching\RegexQuery.cs (13)
18/// classes) become <see cref="None"/> (passthrough). A pattern like <c>(Read|Write)Line</c> compiles 22/// When the entire tree reduces to <see cref="None"/> (e.g. for <c>.*</c> which has no extractable 84public static readonly None Instance = new(); 91/// removing <see cref="None"/> where safe, and collapsing single-child wrappers. 93/// The key asymmetry: <see cref="None"/> means "anything could match here." In an 97/// collapses to <see cref="None"/>. 99/// <b>Post-condition:</b> The returned tree contains <see cref="None"/> only as the top-level 101/// <see cref="Any"/>, or <see cref="Literal"/>, no <see cref="None"/> nodes exist anywhere 127if (optimized is None) 1390 => None.Instance, 154if (optimized is None) 155return None.Instance; 1660 => None.Instance,