RegexGenerator.cs (9)
90if (state is not RegexMethod regexMethod)
165var emittedExpressions = new Dictionary<(string Pattern, RegexOptions Options, int? Timeout), RegexMethod>();
174RegexMethod? regexMethod = null;
175if (result is ValueTuple<RegexMethod, string, DiagnosticData, CompilationData> limitedSupportResult)
180else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl)
196if (emittedExpressions.TryGetValue(key, out RegexMethod? implementation))
237if (result is ValueTuple<RegexMethod, string, DiagnosticData, CompilationData> limitedSupportResult)
245else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl)
296private static bool SupportsCodeGeneration(RegexMethod method, LanguageVersion languageVersion, [NotNullWhen(false)] out string? reason)
RegexGenerator.Emitter.cs (12)
34private static void EmitRegexPartialMethod(RegexMethod regexMethod, IndentedTextWriter writer)
91IndentedTextWriter writer, RegexMethod rm, string reason, LanguageVersion langVer)
125IndentedTextWriter writer, RegexMethod rm, string runnerFactoryImplementation, bool allowUnsafe)
205private static void EmitRegexDerivedTypeRunnerFactory(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow)
627private static (bool NeedsTryFind, bool NeedsTryMatch) EmitScan(IndentedTextWriter writer, RegexMethod rm)
713private static void EmitTryFindNextPossibleStartingPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow)
1448private static void EmitTryMatchAtCurrentPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow)
4902private static void EmitTimeoutCheckIfNeeded(IndentedTextWriter writer, RegexMethod rm, bool appendNewLineIfTimeoutEmitted = true)
5458private static string DescribeNode(RegexNode node, RegexMethod rm)
5501private static string DescribeCapture(int capNum, RegexMethod rm)
5551private static void DescribeExpressionAsXmlComment(TextWriter writer, RegexNode node, RegexMethod rm, int depth = 0)
5621private static string DescribeLoop(RegexNode node, RegexMethod rm)