constructor()

in src/bazel/query_location.ts [31:48]


  constructor(stringRepresentation: string) {
    const parts = stringRepresentation.split(":");
    let isWindowsPath = false;
    if (parts.length > 1 && isNaN(Number(parts[1]))) {
      isWindowsPath = true;
    }

    let pathParts = 1;
    if (isWindowsPath) {
      this.path = parts[0] + ":" + parts[1];
      pathParts = 2;
    } else {
      this.path = parts[0];
    }
    const partsAfterPath = parts.length - pathParts;
    this.line = partsAfterPath > 0 ? parseInt(parts[pathParts], 10) : 1;
    this.column = partsAfterPath > 1 ? parseInt(parts[pathParts + 1], 10) : 1;
  }