<div dir="ltr">On Thu, Jan 4, 2018 at 4:35 PM, Gabriele Svelto <span dir="ltr"><<a href="mailto:gsvelto@mozilla.com" target="_blank">gsvelto@mozilla.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/01/18 23:30, Ben Kelly wrote:<br>
> Could we use our existing idl/webidl/ipdl for this?  It would be nice<br>
> not to have to maintain another code generator in the tree if possible.<br>
<br>
<br>
</span>AFAIK there is no way in IDL to declare an enum. Constants can be<br>
declared but one needs to manually assign them a value which makes it<br>
unsuitable for this task. Also there's no way to attach other metadata<br>
to the declaration (such as a mandatory comment).<br></blockquote><div><br></div><div>We can't have a comment explaining "please add any new constants in sequential order in the following list"?  Or make your "generator" create the idl which then creates the js/c++?</div><div><br></div><div><br></div></div></div></div>