You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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;
|