is_js fix

This commit is contained in:
Onoshko Dan 2014-04-19 01:45:18 +07:00
parent c286fd929d
commit bf3979f327

View File

@ -961,7 +961,7 @@ Cola.Parser.prototype.statement = Cola.Parser.embed_tokens(function() {
return this.simple_statement();
case "name":
if(Cola.is_token(this.peek(), "name")) return type = this.S.token.value, this.next(), tmp = this.var_(false, type), this.semicolon(), tmp;
if(!this.is_js && Cola.is_token(this.peek(), "name")) return type = this.S.token.value, this.next(), tmp = this.var_(false, type), this.semicolon(), tmp;
return Cola.is_token(this.peek(), "punc", ":")
? this.labeled_statement()
: this.simple_statement();