From 02af83f9b416778878e52e2cbbc22d96e312164e Mon Sep 17 00:00:00 2001 From: David Majda Date: Sun, 6 Jan 2013 16:05:42 +0100 Subject: [PATCH] s/subclass/peg$subclass/ The |subclass| function is not intended to be used by user code. --- lib/compiler/passes/generate-javascript.js | 4 ++-- lib/parser.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compiler/passes/generate-javascript.js b/lib/compiler/passes/generate-javascript.js index 0c57d24..7d48bda 100644 --- a/lib/compiler/passes/generate-javascript.js +++ b/lib/compiler/passes/generate-javascript.js @@ -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] : {},', diff --git a/lib/parser.js b/lib/parser.js index d8ad3b5..5e98ee7 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -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] : {},