()
| 34 | } |
| 35 | |
| 36 | extract(): ExtractionResult { |
| 37 | const startTime = Date.now(); |
| 38 | |
| 39 | try { |
| 40 | if (isBareScriptCfml(this.source)) { |
| 41 | this.extractBareScript(); |
| 42 | } else { |
| 43 | this.extractTagBased(); |
| 44 | } |
| 45 | } catch (error) { |
| 46 | this.errors.push({ |
| 47 | message: `CFML extraction error: ${error instanceof Error ? error.message : String(error)}`, |
| 48 | severity: 'error', |
| 49 | code: 'parse_error', |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | return { |
| 54 | nodes: this.nodes, |
| 55 | edges: this.edges, |
| 56 | unresolvedReferences: this.unresolvedReferences, |
| 57 | errors: this.errors, |
| 58 | durationMs: Date.now() - startTime, |
| 59 | }; |
| 60 | } |
| 61 | |
| 62 | /** Modern bare-script `.cfc`/`.cfm`: delegate the whole file to the cfscript grammar. */ |
| 63 | private extractBareScript(): void { |
nothing calls this directly
no test coverage detected