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.

Bug 226471 - Expected an operand but found eof
Summary: Expected an operand but found eof
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows XP x64
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2013-02-21 15:59 UTC by unai
Modified: 2013-08-22 14:28 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Screenshot (60.31 KB, image/png)
2013-02-21 15:59 UTC, unai

Note You need to log in before you can comment on or make changes to this bug.
Description unai 2013-02-21 15:59:30 UTC
Created attachment 131683 [details]

Error shows up for javascript in .JSP files which were OK for NetBeans 7.2.1.

Projects that were fine for NB 7.2 are now invalid for NB 7.3: have to switch back to 7.2 until upgrade gets seamless.
Comment 1 unai 2013-02-21 16:34:44 UTC
Ok, the problem is with the
that ends the javascript-containing comment used to hide the code from very old user-agents not recognizing that script element.

NetBeans 7.2 (and all major rendering engines -- Trident, Gecko, Presto, WebKit, KHTML) allowed for
while NetBeans 7.3 only allows for
(which actually is the right way to do it, but no javascript engine has ever complained about the missing //, and neither did NB7.2, so it looks like a regression. Sort of.).
Comment 2 Petr Pisl 2013-02-21 21:19:17 UTC
NetBeans 7.3 uses different JavaScript parser - Nashorn. It's more strict than Rhino that was used in NetBeans 7.2 - Rhino parser. 

Simple reproducible case:

<!DOCTYPE html>
        <script type="text/javascript"> 
            var result = 20;

I will see what I can do on the NetBeans site.
Comment 3 unai 2013-08-22 14:28:28 UTC
(I accidentally created the bug as P4 instead of default's P3)