From fe8b15c8053ee83103669ffcc032474ea41e6b38 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 23 Aug 2011 16:52:54 +0800 Subject: [PATCH] JSDOC/TokenReader.js --- JSDOC/TokenReader.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/JSDOC/TokenReader.js b/JSDOC/TokenReader.js index 8eab8c7..c38e13b 100644 --- a/JSDOC/TokenReader.js +++ b/JSDOC/TokenReader.js @@ -203,10 +203,15 @@ TokenReader = XObject.define( if ((found == '}' || found == ']') && tokens.lastSym().data == ',') { //print("Error - comma found before " + found); //print(JSON.stringify(tokens.lastSym(), null,4)); - throw { - name : "ArgumentError", - message: "\n" + this.filename + ':' + this.line + " Error - comma found before " + found - } + if (this.ignoreBadGrammer) { + print("\n" + this.filename + ':' + this.line + " Error - comma found before " + found); + } else { + + throw { + name : "ArgumentError", + message: "\n" + this.filename + ':' + this.line + " Error - comma found before " + found + } + } } tokens.push(new Token(found, "PUNC", Lang.punc(found), this.line)); -- 2.39.2