Re: [Vala] Getting all the symbols from my code







From: Dmitry Golovin <dima golovin in>
Sent: Saturday, 7 May 2016, 9:01
Subject: [Vala] Getting all the symbols from my code

I want to have a list of all the symbols from my code.

First I create a CodeContext, then I add all the external packages and source 
files, then visit each file with a Parser.

I expect to get all the CodeNodes from my code, but I only get the top-level 

ones. Is it possible to get all the children of each CodeNode? 


You probably want to be looking at a CodeVisitor. So this file 

I think writes out Vala symbols for a VAPI:
https://git.gnome.org/browse/vala/tree/vala/valacodewriter.vala

I understand other tools have done similar to what you are attempting:
https://git.gnome.org/browse/anjuta/tree/plugins/language-support-vala
https://git.gnome.org/browse/gnome-builder/tree/plugins/vala-pack

Given a lot of IDE tools are re-implementing this there is probably
a case for a libvalaidetools that talks to libvala and provides a stable
API. That would be a signifiant project. I would suggest the Vala build
system also be switched to non-recursive make first so it is easier to
add any new code.

Al


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