line 8:251505 extraneous input '(' expecting Identifier

Sep 3, 2010 at 9:29 AM
Edited Sep 3, 2010 at 9:32 AM

I have some javascript which I guess may just to be too complex for Jint to handle.

(in fact, it's coffee-script.js from http://github.com/jashkenas/coffee-script/tree/master/extras/)

line 1:251505 extraneous input '(' expecting Identifier
line 1:251542 no viable alternative at input ')'
line 1:252155 extraneous input '}' expecting RPAREN

At col 251505, we have this line, which does look rather strange. 

xhr=new (window.ActiveXObject||XMLHttpRequest)("Microsoft.XMLHTTP")

 

 

 

Sep 3, 2010 at 10:06 AM

Hi,

Indeed, this is a behavior not expected by the Jint grammar. If you can, you should split this line in two :

var xhrType=window.ActiveXObject||XMLHttpRequest;

var xhr=new xhrType("Microsoft.XMLHTTP");

 

Sep 10, 2010 at 4:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.