From: Alan Knowles Date: Tue, 23 Aug 2011 08:52:54 +0000 (+0800) Subject: JSDOC/TokenReader.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=fe8b15c8053ee83103669ffcc032474ea41e6b38;ds=sidebyside JSDOC/TokenReader.js --- 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));