UNPKG

spaider

Version:

Deterministic-first AI code assistant that crawls your codebase to implement changes using open source LLMs

20 lines 678 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAST = void 0; const ast_1 = require("../services/ast"); const logger_1 = require("../services/logger"); const parseAST = async (ctx) => { logger_1.Logger.debug(`Analyzing semantics for ${ctx.files.length} files...`); ctx.files = await Promise.all(ctx.files.map(async (file) => { if (file.ast) return file; return { ...file, ast: await ast_1.AST.parseFile(file), }; })); logger_1.Logger.debug(`✓ Parsed ${ctx.files.length} files`); return ctx; }; exports.parseAST = parseAST; //# sourceMappingURL=ast.js.map