ripgrepTextSearchEngine.ts ×8

Frontier kind: Joint frontier

unlabeled · c_47a56187bcce

1 test · 11279 LOC · 47 files · introduces 1 test · 61 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges61 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1621 ranges11279 lines · 47 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationripgrepTextSearchEngine.ts ×6 · 31 introduced LOCripgrepTextSearchEngine.…ripgrepTextSearchEngine.ts ×23 · 581 introduced LOCripgrepTextSearchEngine.…ripgrepSearchUtils.ts ×5 · 26 introduced LOCripgrepSearchUtils.ts ×5log.ts ×72 · 446 introduced LOClog.ts ×72search.ts ×34 · 1119 introduced LOCsearch.ts ×34buffer.test|title=Buffer Performance issue with VSBuffer#slice #76076|occurrence=1 · 0 introduced LOCbuffer.test|title=Buffer…glob.ts ×1 · 5 introduced LOCglob.ts ×1glob.ts ×1 · 2 introduced LOCglob.ts ×1glob.ts ×1 · 1 introduced LOCglob.ts ×1glob.ts ×8 · 25 introduced LOCglob.ts ×8glob.ts ×24 · 167 introduced LOCglob.ts ×24contextkey.ts ×1 · 2 introduced LOCcontextkey.ts ×1contextkey.ts ×3 · 7 introduced LOCcontextkey.ts ×3async.ts ×202 · 1247 introduced LOCasync.ts ×202contextkey.ts ×1 · 3 introduced LOCcontextkey.ts ×1contextkey.ts ×1 · 2 introduced LOCcontextkey.ts ×1contextkey.ts ×1 · 3 introduced LOCcontextkey.ts ×1contextkey.ts ×1 · 2 introduced LOCcontextkey.ts ×1contextkey.ts ×2 · 3 introduced LOCcontextkey.ts ×2contextkey.ts ×1 · 2 introduced LOCcontextkey.ts ×1contextkey.ts ×2 · 3 introduced LOCcontextkey.ts ×2contextkey.ts ×2 · 3 introduced LOCcontextkey.ts ×2contextkey.ts ×1 · 2 introduced LOCcontextkey.ts ×1contextkey.ts ×1 · 4 introduced LOCcontextkey.ts ×1contextkey.ts ×201 · 796 introduced LOCcontextkey.ts ×201hash.ts ×17 · 74 introduced LOChash.ts ×17resources.ts ×23 · 253 introduced LOCresources.ts ×23network.ts ×20 · 292 introduced LOCnetwork.ts ×20strings.test|title=Strings trimWhitespace|occurrence=1 · 0 introduced LOCstrings.test|title=Strin…extpath.ts ×17 · 91 introduced LOCextpath.ts ×17strings.ts ×101 · 542 introduced LOCstrings.ts ×101cancellation.test|title=CancellationToken None|occurrence=1 · 0 introduced LOCcancellation.test|title=…cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18event.ts ×1 · 1 introduced LOCevent.ts ×1event.ts ×4 · 9 introduced LOCevent.ts ×4event.ts ×2 · 6 introduced LOCevent.ts ×2event.ts ×93 · 864 introduced LOCevent.ts ×93buffer.ts ×42 · 483 introduced LOCbuffer.ts ×42scanner.ts ×13 · 13 introduced LOCscanner.ts ×13scanner.ts ×3 · 3 introduced LOCscanner.ts ×3scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×1 · 1 introduced LOCscanner.ts ×1scanner.ts ×36 · 181 introduced LOCscanner.ts ×36uri.ts ×3 · 14 introduced LOCuri.ts ×3ripgrep.ts ×2 · 10 introduced LOCripgrep.ts ×2uri.ts ×3 · 3 introduced LOCuri.ts ×3uri.ts ×2 · 2 introduced LOCuri.ts ×2map.ts ×1 · 2 introduced LOCmap.ts ×1uri.ts ×3 · 3 introduced LOCuri.ts ×3map.ts ×1 · 4 introduced LOCmap.ts ×1map.ts ×1 · 6 introduced LOCmap.ts ×1uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…uri.ts ×2 · 10 introduced LOCuri.ts ×2utils.ts ×3 · 9 introduced LOCutils.ts ×3uri.ts ×1 · 2 introduced LOCuri.ts ×1instantiation.ts ×4 · 10 introduced LOCinstantiation.ts ×4uri.ts ×9 · 37 introduced LOCuri.ts ×9nls.ts ×1 · 1 introduced LOCnls.ts ×1errorMessage.ts ×6 · 29 introduced LOCerrorMessage.ts ×6linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13nls.ts ×6 · 13 introduced LOCnls.ts ×6objects.ts ×13 · 65 introduced LOCobjects.ts ×13instantiation.ts ×5 · 111 introduced LOCinstantiation.ts ×5lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lazy.ts ×1 · 2 introduced LOClazy.ts ×1lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/async.ts · 2749 LOCcommon/async.tssrc/vs/base/common/buffer.ts · 499 LOCcommon/buffer.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errorMessage.ts · 113 LOCcommon/errorMessage.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/extpath.ts · 433 LOCcommon/extpath.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/glob.ts · 861 LOCcommon/glob.tssrc/vs/base/common/hash.ts · 324 LOCcommon/hash.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/network.ts · 440 LOCcommon/network.tssrc/vs/base/common/objects.ts · 286 LOCcommon/objects.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/resources.ts · 444 LOCcommon/resources.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/stream.ts · 790 LOCcommon/stream.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/symbols.ts · 9 LOCcommon/symbols.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/node/ripgrep.ts · 15 LOCnode/ripgrep.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/contextkey/common/contextkey.ts · 2183 LOCcommon/contextkey.tssrc/vs/platform/contextkey/common/scanner.ts · 384 LOCcommon/scanner.tssrc/vs/platform/instantiation/common/instantiation.ts · 130 LOCcommon/instantiation.tssrc/vs/platform/log/common/log.ts · 926 LOCcommon/log.tssrc/vs/workbench/services/search/common/search.ts · 880 LOCcommon/search.tssrc/vs/workbench/services/search/common/searchExtConversionTypes.ts · 567 LOCcommon/searchExtConversi…src/vs/workbench/services/search/common/searchExtTypes.ts · 569 LOCcommon/searchExtTypes.tssrc/vs/workbench/services/search/node/ripgrepSearchUtils.ts · 34 LOCnode/ripgrepSearchUtils.…src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts · 783 LOCnode/ripgrepTextSearchEn…buffer.test|title=Buffer Performance issue with VSBuffer#slice #76076|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/buffer.test|title=Buffer Performance issue with VSBuffer#slice #76076|occurrence=1buffer.test|title=Buffer…cancellation.test|title=CancellationToken None|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/cancellation.test|title=CancellationToken None|occurrence=1cancellation.test|title=…charCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…strings.test|title=Strings trimWhitespace|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/strings.test|title=Strings trimWhitespace|occurrence=1strings.test|title=Strin…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…ripgrepTextSearchEngineUtils.test|title=RipgrepTextSearchEngine brace expansion for ripgrep|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test|title=RipgrepTextSearchEngine brace expansion for ripgrep|occurrence=1ripgrepTextSearchEngineU…Focused concept · ripgrepTextSearchEngine.ts ×8 · 61 introduced LOCripgrepTextSearchEngine.…

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 61 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts 59 introduced LOC · 8 ranges

Open complete file

690 switch (char) {
691 case '\\':
692 > if (escaped) { ripgrepTextSearchEngine.ts
693 > // If we're already escaped, then just leave the escaped slash and the preceeding slash that escapes it.
694 > // The two escaped slashes will result in a single slash and whatever processes the glob later will properly process the escape
695 > if (inBraces) {
696 > strInBraces += '\\' + char;
697 > } else {
698 fixedStart += '\\' + char;
699 }
700 > escaped = false; ripgrepTextSearchEngine.ts
701 > } else {
702 > escaped = true;
703 > }
704 > break;
705 case '{':
706 > if (escaped) { ripgrepTextSearchEngine.ts
707 > // if we escaped this opening bracket, then it is to be taken literally. Remove the `\` because we've acknowleged it and add the `{` to the appropriate string
708 > if (inBraces) {
709 strInBraces += char;
711 > fixedStart += char;
712 > }
713 > escaped = false;
714 > } else {
715 > if (inBraces) {
716 > // ripgrep treats this as attempting to do a nested alternate group, which is invalid. Return with pattern including changes from escaped braces.
717 > return { strInBraces: fixedStart + '{' + strInBraces + '{' + pattern.substring(i + 1) };
718 > } else {
719 > inBraces = true;
720 > }
721 > }
722 > break;
723 case '}':
724 > if (escaped) { ripgrepTextSearchEngine.ts
725 > // same as `}`, but for closing bracket
726 > if (inBraces) {
727 > strInBraces += char;
728 > } else {
729 fixedStart += char;
730 }
731 > escaped = false; ripgrepTextSearchEngine.ts
732 > } else if (inBraces) {
733 > // we found an end bracket to a valid opening bracket. Return the appropriate strings.
734 > return { fixedStart, strInBraces, fixedEnd: pattern.substring(i + 1) };
735 > } else {
736 > // if we're not in braces and not escaped, then this is a literal `}` character and we're still adding to fixedStart.
737 > fixedStart += char;
738 > }
739 > break;
740 default:
741 // similar to the `\\` case, we didn't do anything with the escape, so we should re-insert it into the appropriate string
742 // to be consumed later when individual parts of the glob are processed
743 if (inBraces) {
744 > strInBraces += (escaped ? '\\' : '') + char; ripgrepTextSearchEngine.ts
745 } else {
746 fixedStart += (escaped ? '\\' : '') + char;
765 return [strInBraces];
766 }
768 > let arr = splitGlobAware(strInBraces, ',');
769 >
770 > if (!arr.length) {
771 > // occurs if the braces are empty.
772 > arr = [''];
773 > }
774 >
775 > const ends = performBraceExpansionForRipgrep(fixedEnd);
776 >
777 > return arr.flatMap((elem) => {
778 > const start = fixedStart + elem;
779 > return ends.map((end) => {
780 > return start + end;
781 > });
782 > });
783 > }
src/vs/base/common/glob.ts 2 introduced LOC · 1 range

Open complete file

66 export function splitGlobAware(pattern: string, splitChar: string): string[] {
67 if (!pattern) {
68 > return []; glob.ts
69 > }
70
71 const segments: string[] = [];