MCPcopy Create free account
hub / github.com/corbanbrook/dsp.js / transformGlobalClass

Function transformGlobalClass

examples/js/processing.js:11852–11867  ·  view source on GitHub ↗
(class_)

Source from the content-addressed store, hash-verified

11850
11851
11852 function transformGlobalClass(class_) {
11853 var m = classesRegex.exec(class_); // 1 - attr, 2 - class|int, 3 - name, 4 - extends, 5 - implements, 6 - body
11854 classesRegex.lastIndex = 0;
11855 var body = atoms[getAtomIndex(m[6])];
11856 if(m[2] === "interface") {
11857 return new AstInterface(m[3]);
11858 } else {
11859 var oldClassId = currentClassId, newClassId = generateClassId();
11860 currentClassId = newClassId;
11861 var globalClass = new AstClass(m[3], transformClassBody(body, m[3], m[4], m[5]) );
11862 appendClass(globalClass, newClassId, oldClassId);
11863
11864 currentClassId = oldClassId;
11865 return globalClass;
11866 }
11867 }
11868
11869 function AstMethod(name, params, body) {
11870 this.name = name;

Callers

nothing calls this directly

Calls 3

getAtomIndexFunction · 0.85
generateClassIdFunction · 0.85
appendClassFunction · 0.85

Tested by

no test coverage detected