MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / addFunctions

Method addFunctions

src/code-gen/context.ts:46–58  ·  view source on GitHub ↗
(fns: CodeGenFunction[], sectionTitle?: string)

Source from the content-addressed store, hash-verified

44 }
45
46 addFunctions(fns: CodeGenFunction[], sectionTitle?: string) {
47 if (!fns.length) return;
48 this.functions.push(...fns);
49 const code: ArrayJoinInput<string>[] = [];
50 for (const fn of fns) {
51 code.push('', ...generateFunctionCode(fn))
52 }
53 if (sectionTitle) {
54 this.addSection(sectionTitle, code);
55 } else {
56 this.code.push(...code)
57 }
58 }
59
60 clearCode() {
61 this.code = [];

Callers 1

generateCoderLibraryFunction · 0.80

Calls 2

addSectionMethod · 0.95
generateFunctionCodeFunction · 0.90

Tested by

no test coverage detected