MCPcopy Create free account
hub / github.com/Reflectology/M0WER / convertTokensToCodeStructure

Method convertTokensToCodeStructure

src/codeAnalyzer.ts:246–266  ·  view source on GitHub ↗
(tokenResults: any)

Source from the content-addressed store, hash-verified

244}
245export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected