asm-js / validator

A reference validator for asm.js.
Apache License 2.0
1.78k stars 148 forks source link

Spec should allow arbitrary parentheses around expressions (section 4). #65

Closed cscott closed 10 years ago

cscott commented 11 years ago

In the general syntax rules, the spec should mention that arbitrary parentheses should be permitted. That is, if the syntax rule in the spec says:

x:Identifier = +x:Identifier; it is intended that the following all match this rule: x = +x; x = +(x); x = +((((x))));

cscott commented 11 years ago

You should also be clear whether parentheses are allowed around local function definitions, since those could in theory be parsed either as statements or as expressions. I believe the ECMAScript grammar causes them to be parsed as statements, therefore parenthesization is not allowed, but this should be specifically stated.

sunfishcode commented 10 years ago

This was addressed in 7881fbe325fbfbeed1caf5d1d48b8c5f121ead2d.