[wg-camlp4] A new branch to experiment with extension points

Alain Frisch alain.frisch at lexifi.com
Wed Mar 6 10:05:43 GMT 2013


On 03/04/2013 08:09 PM, Leo White wrote:
> How about including "Item" extensions "[%%lid expr]"?

I now believe it would also be useful to have attributes as 
extension/signature item (in addition to attributes *on* items).  This 
will be lighter than putting attributes on "include" statements (e.g. 
for ocamldoc section headers), and it could also be useful to specify 
meta-data for the whole unit (as an attribute at the beginning of the 
file).   This problem is that this requires a third syntax for attributes.

Do people agree on the need for such attributes, and that a new syntax 
is required?  Any proposal?  I believe the following would be safe, for 
instance:

  [*  ...]
  [@@@ ...]
  [%? ...]


An alternative could be to have a "nop" signature/structure item 
(semantically equivalent to "include sig end"/"include struct end"), on 
which we can use the standard syntax for item attributes.  But we still 
need some new syntax for it...


Alain


More information about the wg-camlp4 mailing list