MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / constructor

Method constructor

src/extraction/tree-sitter.ts:437–449  ·  view source on GitHub ↗
(
    filePath: string,
    source: string,
    language?: Language,
    options?: { sourceIsPreParsed?: boolean }
  )

Source from the content-addressed store, hash-verified

435 private sourceIsPreParsed = false;
436
437 constructor(
438 filePath: string,
439 source: string,
440 language?: Language,
441 options?: { sourceIsPreParsed?: boolean }
442 ) {
443 this.filePath = filePath;
444 this.source = source;
445 this.language = language || detectLanguage(filePath, source);
446 this.extractor = EXTRACTORS[this.language] || null;
447 this.fnRefSpec = FN_REF_SPECS[this.language];
448 this.sourceIsPreParsed = options?.sourceIsPreParsed === true;
449 }
450
451 /**
452 * Parse and extract from the source code

Callers

nothing calls this directly

Calls 1

detectLanguageFunction · 0.90

Tested by

no test coverage detected