pegjs/lib/utils/classes.js
David Majda 5adad3ae12 Utility functions cleanup: Split lib/utils.js
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.
2014-05-08 20:28:31 +02:00

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;