diff --git a/lib/parse.js b/lib/parse.js index e73fb60d..5e45fbdc 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -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();