*/
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();
}
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
+
+ );
+
}
}