From a7584fa8784fa082db85c3c1b598870ad7ff4213 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 29 Oct 2012 08:21:46 +0100 Subject: [PATCH] Rebuild src/parser.js (forgotten in the previous commit) --- src/parser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index 2a65190..b3d6268 100644 --- a/src/parser.js +++ b/src/parser.js @@ -5,6 +5,12 @@ PEG.parser = (function(){ * http://pegjs.majda.cz/ */ + function subclass(child, parent) { + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function quote(s) { /* * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a @@ -2870,7 +2876,7 @@ PEG.parser = (function(){ this.column = column; }; - result.SyntaxError.prototype = Error.prototype; + subclass(result.SyntaxError, Error); return result; })();