Re: API documentation from introspection data



On Sun, Feb 19, 2012 at 1:25 PM, Alberto Ruiz <aruiz gnome org> wrote:
> I think that a tool to convert the doc string into something
> C/Python/Vala/GJS friendly (with links to each node) would be nice. If it
> had some sort of integration with the AST it would be nice so that we could
> somehow dynamically assign http/mallard xrefs. I am not sure what the right
> approach is but this is a problem that we both have I think. There's some
> code to do that in giraffe for C and Python IIRC.
>
>
>>
>> Regards,
>>
>> Tomeu

Well, in order to share the "Language Smarts" logic, we need to
determine what things change per language. Note that the
mallard-templates branch has a template per language, which is an
approach I'm not all that fond of. I think encapsulating all the
things that change between languages into a simple Python class would
be better.

See something like:
https://github.com/magcius/gobject-introspection/commit/3d36e1f8a0d08311669023a72a2441775471ec28
 (I was hacking on this to put a lot of common things in the
docbook/mallard backends, which was before I realized that we were
killing off the docbook writer, so the commit message is a bit
outdated).

Having that act directly on the AST nodes would be the best approach here.

-- 
  Jasper


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