lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the argument list of a procedure


From: David Nalesnik
Subject: Re: getting the argument list of a procedure
Date: Thu, 5 Mar 2015 10:11:47 -0600

Hi Anders,

On Thu, Mar 5, 2015 at 2:47 AM, <address@hidden> wrote:

[...]

If you've got access to the actual scheme-code where the definitions
takes place it should be possible to use rewrite macros.

Something along the lines below would give you a table (an ordinary list
here) 'procargstable keeping the procedure-name and the verbatim
argument-list:

[...]
 

I'd actually be a bit surprised if LilyPond didn't use specialised
macros for defining its functions already, meaning you could just
specialize these a bit further...

Where do we find the definitions in LY?

Thanks!  This is very helpful information. 

What you are suggesting seems to be analogous to what is already done for the functions on the Scheme functions documentation page I referenced earlier.
These are all created with a macro LY_DEFINE, which both makes these C++ functions accessible from Scheme and adds to a hash table from which the documentation is created.

As Paul points out, the Scheme procedures I'm wanting to document are created simply with define-public.

So, as I understand it, I would create a macro which would both define and export the function (define-public) and add its name and arguments to some sort of table.  This would have the benefit of allowing us to be selective about what is documented. 

--David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]