[wg-camlp4] Structure/signature attributes suggestion

Leo White lpw25 at cam.ac.uk
Fri Oct 11 19:04:33 BST 2013


> My understanding of Alain's ";;[@..]" was that he introduced a specific "empty item" in the AST of the current
> structure/signature. Extending this technique to the example you've shown would require adding such phony items in a
> few more syntactic positions, which may or may not be a good idea.

Yes, there would need to be some additional phony items. In some cases,
like between class items, this is not a large change. For others, like
recursive type definitions, it means adding an extra layer of variants
which is a bit annoying.

There may be some alternative methods of attaching these annotations to
the right part of the AST, but I don't think any of them will be
particularly nicer than this one.

Regards,

Leo


More information about the wg-camlp4 mailing list