janekptacijarabaci 2018-05-02 07:08:14 +02:00 committed by Roy Tam
commit 9ab20590c6
5 changed files with 10 additions and 10 deletions

View file

@ -77,7 +77,8 @@
}
},
word: function(re) {
var word = "", ch, re = re || /[\w$]/;
var word = "", ch;
re = re || /[\w$]/;
while ((ch = this.spec.charAt(this.pos)) && re.test(ch)) { word += ch; ++this.pos; }
return word;
},
@ -187,7 +188,7 @@
if (top && this.forceNew) return new infer.Obj(base);
return infer.getInstance(base);
} else if (this.eat(":")) {
var name = this.word(/[\w$\.]/)
name = this.word(/[\w$\.]/)
return infer.getSymbol(name)
} else if (comp && this.eat("!")) {
var arg = this.word(/\d/);