()
| 88 | } |
| 89 | |
| 90 | extract(): ExtractionResult { |
| 91 | const startTime = Date.now(); |
| 92 | |
| 93 | try { |
| 94 | if (isBareScriptCfml(this.source)) { |
| 95 | this.extractBareScript(); |
| 96 | } else { |
| 97 | this.extractTagBased(); |
| 98 | } |
| 99 | } catch (error) { |
| 100 | this.errors.push({ |
| 101 | message: `CFML extraction error: ${error instanceof Error ? error.message : String(error)}`, |
| 102 | severity: 'error', |
| 103 | code: 'parse_error', |
| 104 | }); |
| 105 | } |
| 106 | |
| 107 | return { |
| 108 | nodes: this.nodes, |
| 109 | edges: this.edges, |
| 110 | unresolvedReferences: this.unresolvedReferences, |
| 111 | errors: this.errors, |
| 112 | durationMs: Date.now() - startTime, |
| 113 | }; |
| 114 | } |
| 115 | |
| 116 | /** Modern bare-script `.cfc`/`.cfm`: delegate the whole file to the cfscript grammar. */ |
| 117 | private extractBareScript(): void { |
nothing calls this directly
no test coverage detected