5adad3ae12
Split lib/utils.js into multiple files. Some of the functions were generic, these were moved into files in lib/utils. Other funtions were specific for the compiler, these were moved to files in lib/compiler. This commit only moves functions around -- there is no renaming and cleanup performed. Both will come later.
15 lines
355 B
JavaScript
15 lines
355 B
JavaScript
/* Class utilities */
|
|
var classes = {
|
|
/*
|
|
* The code needs to be in sync with the code template in the compilation
|
|
* function for "action" nodes.
|
|
*/
|
|
subclass: function(child, parent) {
|
|
function ctor() { this.constructor = child; }
|
|
ctor.prototype = parent.prototype;
|
|
child.prototype = new ctor();
|
|
},
|
|
};
|
|
|
|
module.exports = classes;
|