- else {
- tokens.push(new Token(found, "PUNC", Lang.punc(found), this.line));
- return true;
+
+ if ((found == '}' || found == ']') && tokens.lastSym().data == ',') {
+ //print("Error - comma found before " + found);
+ //print(JSON.stringify(tokens.lastSym(), null,4));
+ throw {
+ name : "ArgumentError",
+ message: "Error - comma found before " + found + " on line " + this.line + "\n"
+ }