X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FTokenReader.vala;h=631fe3431179066c8332ab760dea178c34013c56;hb=981e36e52daf5f0dd3af63dfba6f411e45a26a3e;hp=66034d18c928d301cbb9bdde7b626ae849cdf015;hpb=6da0001189ab14d648ae3211aca41b614780a43f;p=gnome.introspection-doc-generator diff --git a/JSDOC/TokenReader.vala b/JSDOC/TokenReader.vala index 66034d1..631fe34 100644 --- a/JSDOC/TokenReader.vala +++ b/JSDOC/TokenReader.vala @@ -242,9 +242,9 @@ namespace JSDOC { */ public bool read_punc (TokenStream stream, TokenArray tokens) { - var found = ""; + string found = ""; var name; - while (!stream.look().eof && Lang.punc(found + stream.look())) { + while (!stream.look().eof && Lang.punc(found + stream.look()).length > 0) { found += stream.next(); } @@ -261,11 +261,11 @@ namespace JSDOC { 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 - } + throw new TokenReader_Error.ArgumentError( + this.filename + ":" + this.line + " comma found before " + found + + ); + } }