MCPcopy Index your code
hub / github.com/CoderLine/alphaTab / writeCommaSeparated

Function writeCommaSeparated

packages/transpiler/src/AstPrinterBase.ts:74–87  ·  view source on GitHub ↗
(values: T[], write: (p: T) => void, newLine?: boolean)

Source from the content-addressed store, hash-verified

72 }
73
74 protected writeCommaSeparated<T>(values: T[], write: (p: T) => void, newLine?: boolean) {
75 if (newLine === undefined) {
76 newLine = values.length > 5;
77 }
78 values.forEach((v, i) => {
79 if (i > 0) {
80 this.write(', ');
81 if (newLine) {
82 this.writeLine();
83 }
84 }
85 write(v);
86 });
87 }
88
89 protected abstract writeClassDeclaration(d: cs.ClassDeclaration): void;
90 protected abstract writeEnumDeclaration(d: cs.EnumDeclaration): void;

Callers

nothing calls this directly

Calls 4

writeFunction · 0.85
writeLineMethod · 0.80
writeMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected