jshint/jshint — pull request #1216 by campd (2013-08-03 02:56:09+00:00)
Title: Issue #1095: Support for array comprehensions using for-of

This adds support for for .. of comprehensions.

for .. in comprehensions already kinda sorta worked - [i for (i in foo)] read 'i in foo' as a single expression, but 'of' isn't a valid infix like 'in' is.

This patch handles the two sides of the in/of separately. It adds a new state to the CompArray, "generate", which is used while parsing the generator side of the in/of separator.

Standard first patch disclaimers apply.