- else {
- var name;
- if ((name = Lang.keyword(found))) {
- tokens.push(new Token(found, "KEYW", name, this.line));
- return true;
- }
- if (!this.sepIdents || found.indexOf('.') < 0 ) {
- tokens.push(new Token(found, "NAME", "NAME", this.line));
- return true;
- }
- var n = found.split('.');
- var p = false;
- var _this = this;
- n.forEach(function(nm) {
- if (p) {
- tokens.push(new Token('.', "PUNC", "DOT", _this.line));
- }
- p=true;
- tokens.push(new Token(nm, "NAME", "NAME", _this.line));
- });
- return true;
+
+ var name;
+ if ((name = Lang.keyword(found))) {
+ if (found == 'return' && tokens.lastSym().data == ')') {
+ throw {
+ name : "ArgumentError",
+ message: "\n" + this.filename + ':' + this.line + " Error - return found after )"
+ }
+