INNER CODE UNIT · TypeScript

endPos

microsoft/PSRule · src/vscode-ps-rule/dependencyLens.ts:84

                const endPos = document.positionAt(outerMatches.index + outerMatches[0].length);
                outerRange = new Range(startPos, endPos);
            }

            // Add links for each module.
            if (outerRange) {

                let matches;
                while ((matches = this.regexModuleName.exec(text)) !== null) {
                    let name = matches.groups !== undefined ? matches.groups['name'].replace(/\'/g, '') : '';

                    const line = document.lineAt(document.positionAt(matches.index).line);
                    const indexOf = line.text.indexOf(matches[1]);
                    const position = new Position(line.lineNumber, indexOf);
                    const range = document.getWordRangeAtPosition(position);
                    if (range && name && outerRange.contains(range)) {
                        this.codeLenses.push(await this.createUpgradeModuleCodeLens(range, document.uri.fsPath, name));
                    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…