s/subclass/peg$subclass/

The |subclass| function is not intended to be used by user code.
redux
David Majda 12 years ago
parent 4fe32cee8c
commit 02af83f9b4

@ -668,7 +668,7 @@ module.exports = function(ast, options) {
' * http://pegjs.majda.cz/',
' */',
'',
' function subclass(child, parent) {',
' function peg$subclass(child, parent) {',
' function ctor() { this.constructor = child; }',
' ctor.prototype = parent.prototype;',
' child.prototype = new ctor();',
@ -735,7 +735,7 @@ module.exports = function(ast, options) {
' this.message = buildMessage(expected, found);',
' }',
'',
' subclass(SyntaxError, Error);',
' peg$subclass(SyntaxError, Error);',
'',
' function parse(input) {',
' var options = arguments.length > 1 ? arguments[1] : {},',

@ -5,7 +5,7 @@ module.exports = (function() {
* http://pegjs.majda.cz/
*/
function subclass(child, parent) {
function peg$subclass(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
@ -62,7 +62,7 @@ module.exports = (function() {
this.message = buildMessage(expected, found);
}
subclass(SyntaxError, Error);
peg$subclass(SyntaxError, Error);
function parse(input) {
var options = arguments.length > 1 ? arguments[1] : {},

Loading…
Cancel
Save