(
filePath: string,
source: string,
language?: Language,
options?: { sourceIsPreParsed?: boolean }
)
| 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 |
nothing calls this directly
no test coverage detected