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.
The let statement (and let expressions and definitions) introduced in Mozilla's JavaScript 1.7 is not recognized for coloring: For example: http://developer.mozilla.org/en/New_in_JavaScript_1.7#Block_scope_with_let let (x = x+10, y = 12) { print(x+y + "\n"); } There are also a few other JavaScript constructs (which I haven't already reported) which were introduced in the later JavaScript versions that also don't work with JavaScript syntax coloring in NetBeans: Generators: http://developer.mozilla.org/en/New_in_JavaScript_1.7 Expression closures and Generator expressions: http://developer.mozilla.org/en/New_in_JavaScript_1.8
Correct, that's new in JavaScript 1.7 and unfortunately not yet supported by our parser. We're way past feature freeze for 6.5 (we're entering high resistance in a day or two) so this will have to wait for the next release. There's no target milestone for that in the issue tracker yet so marking it future.
Actually, I'm changing this to a task for the next release instead of a bug in the current release, and assigning it a higher priority. I noticed you filed a couple of other issues on JavaScript 1.7 stuff; I will make those issues duplicates of this one. (I will update the parser to all the JS 1.7 features at the same time, not piecemeal.)
*** Issue 147679 has been marked as a duplicate of this issue. ***
*** Issue 147680 has been marked as a duplicate of this issue. ***
Ok, thanks, that'd be great. There is also JavaScript 1.8, though in the code I've worked with so far, I personally haven't come across its features, though of course it'd be nice to have. Regardless of whether you want to group that as a bug with this one, file a second one, or ignore it for now, this page on JavaScript 1.8 also mentions the fixing of a bug in the handling of one of the features added in JavaScript 1.7, destructuring of arrays): http://developer.mozilla.org/en/docs/New_in_JavaScript_1.8
This is fixed now -- JavaScript 1.7 support is in 7.0. Now we need a new issue tracking JavaScript 1.8 support :)
Just to verify you were aware of this also... JavaScript 1.7 with destructuring arrays, also allows the "var" keyword: var [a, b, c] = getArray(); thanks...
Is there a problem with the var [a, b, c] = getArray(); form? I'm not seeing any errors for that in my build.
I was just reporting it in case your fix hadn't addressed it. I haven't worked any builds since 6.5.
Actually I do see a problem (though not an error) when adding the var keyword before a destructured assignment... Subsequent references to variables assigned in this way are colored by the editor as though they were global variables, even though "var" should be making them local...
I see that this issue has not been touched for a few years! When will it be addressed? We are considering to use "let", and lack of support in NB editor is one impediment.
There are some features of EcmaScript 6 already implemented. See more issue #242387. In the fact, it's already done, but we are waiting for approval to put the grall parser into the build.
I think this ticket is obsolete, because of the new support von ES6 in Netbeans. :) Just to let you know.
The ES6 features are in trunk now.