Re: Dictionaries as return values

On Wed, Aug 21, 2013 at 2:06 AM, Tommy Widenflycht <tommyw@google.com>wrote:

> I have tried to parse the WebIDL spec and can find no evidence that this
> is allowed by looking at the grammar. The text seems to indicate that it is
> possible however.


The grammar allows the [ReturnType] nonterminal to expand to an identifier,
which can then denote a dictionary, as the following text says:
http://www.w3.org/TR/WebIDL/#dfn-return-type

> If the return type is an identifier<http://www.w3.org/TR/WebIDL/#dfn-identifier>or an identifier followed by
> ?, then the identifier MUST identify an interface, dictionary, enumeration<http://www.w3.org/TR/WebIDL/#dfn-enumeration>,
> callback function <http://www.w3.org/TR/WebIDL/#dfn-callback-function> or
> typedef <http://www.w3.org/TR/WebIDL/#dfn-typedef>.
>
So this is definitely allowed by WebIDL.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Wednesday, 21 August 2013 04:32:13 UTC