2008/7/28 Ingvar von Schoultz <[EMAIL PROTECTED]>: > If [...] is preceded by =, or enclosed in ( ), or in some other > position where you can't have a block, it's a literal. If it's > a literal it must contain a comma-separated list of values, so > if the syntax doesn't match this, it's a block.
Such rules require an arbitrary look ahead in the parser so it can distinguish that in cases like if (x) [arbitrary_expression;] [] means a block while in if (x) [arbitrarily_expression]; [] would mean a literal. This would require a mayor change in most if not all current ES parser implementations. There were some proposals for ES4 syntax that would require such look ahead, but they were rejected not only technical grounds but also on the grounds that such look ahead poses comprehension problem for a human brain! And here are we talking about a minimalistic sugar for ES3.1. Regards, Igor _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
