예제 #1
0
            public static (ImmutableDictionary <string, TextSpan>, ImmutableDictionary <int, TextSpan>) Analyze(
                VirtualCharSequence text, RegexCompilationUnit root, RegexOptions options)
            {
                var analyzer = new CaptureInfoAnalyzer(text);

                return(analyzer.Analyze(root, options));
            }
                         >) Analyze(RegexCompilationUnit root, RegexOptions options)
            {
                CollectCaptures(root, options);
                AssignNumbersToCaptureNames();

                _captureNames.Free();
                return(_captureNameToSpan.ToImmutable(), _captureNumberToSpan.ToImmutable());
            }
예제 #3
0
            private (ImmutableDictionary <string, TextSpan>, ImmutableDictionary <int, TextSpan>) Analyze(
                RegexCompilationUnit root, RegexOptions options)
            {
                CollectCaptures(root, options);
                AssignNumbersToCaptureNames();

                _captureNames.Free();
                return(_captureNameToSpan.ToImmutable(), _captureNumberToSpan.ToImmutable());
            }
예제 #4
0
 public void Visit(RegexCompilationUnit node)
 {
     // Nothing to highlight.
 }
                               >) Analyze(VirtualCharSequence text, RegexCompilationUnit root, RegexOptions options)
            {
                var analyzer = new CaptureInfoAnalyzer(text);

                return(analyzer.Analyze(root, options));
            }