(tokenResults: any)
| 244 | } |
| 245 | export class TokenAdapter { |
| 246 | public convertTokensToCodeStructure(tokenResults: any): CodeStructure { |
| 247 | const codeStructure: CodeStructure = { entities: [], relationships: [] }; |
| 248 | |
| 249 | // Convert token results to code structure |
| 250 | tokenResults.forEach((token: any) => { |
| 251 | const entity: CodeEntity = { |
| 252 | id: token.id, |
| 253 | name: token.name, |
| 254 | type: token.type, |
| 255 | metrics: { |
| 256 | complexity: token.complexity, |
| 257 | utility: token.utility, |
| 258 | cost: token.cost |
| 259 | }, |
| 260 | axioms: token.axioms |
| 261 | }; |
| 262 | codeStructure.entities.push(entity); |
| 263 | }); |
| 264 | |
| 265 | return codeStructure; |
| 266 | } |
| 267 | } |
nothing calls this directly
no outgoing calls
no test coverage detected