Grammar for Union Types

Hi,

>From my reading of the grammar of the latest editors draft of Web IDL,
it doesn't match what the examples show is supposed to be supported.

For instance, "float or (Date or Event) or (Node or DOMString)?" doesn't
match the "Type" production, since "ParenthesizedUnionType" only appears
in "Type", and not in SingleType.

Also, I think the usage of parenthesis in types changes the nature of
the grammar. In the example below:
        interface Foo {
          (DOMString) or ();
        };
you can't determine that "or" is actually the name of an operation until
you hit the empty parenthesis.

Also, since "any" is not acceptable in an union type, it probably
shouldn't be allowed in the grammar.

Dom

Received on Tuesday, 3 January 2012 16:35:39 UTC