This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please try to copy&paste following in js file: $?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d; The regular expression is not recognized (so it's not purple) and the code is marked as invalid. If you reformat it a bit (manually as autoformat does it incorrectly): $?c.onreadystatechange=function(){ /loaded|complete/.test(c.readyState)&&d() }:c.onload=c.onerror=d; Now it is okay. This snippet is extracted from minimized AngularJS http://code.angularjs.org/1.0.2/angular.min.js and thanks to this, the project as such has error badge Product Version: NetBeans IDE Dev (Build 201210100002) Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b03 System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb)
It might be a bug in the parser.
It seems to be a bug in nashorn lexer. Should be fixed now in web-main: 985652656f27, d2fb8aaffff4 and 1d5be42e26cb.
Thanks, no error found and formatting works. Product Version: NetBeans IDE Dev (Build 201210120002) Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b03 System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb)