On 03/01/18 23:30, Ben Kelly wrote:
> Could we use our existing idl/webidl/ipdl for this?  It would be nice
> not to have to maintain another code generator in the tree if possible.


AFAIK there is no way in IDL to declare an enum. Constants can be
declared but one needs to manually assign them a value which makes it
unsuitable for this task. Also there's no way to attach other metadata
to the declaration (such as a mandatory comment).

Don't get me wrong though, I am convinced it would be better if this
could be done in IDL because it could then be attached to the relevant
interface (such as nsIObserverService) and we wouldn't need separate
generation of the C++ and JS code, but we would need to significantly
extend it for the purpose.

 Gabriele

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to