[Vala] Getting all the symbols from my code



Hi!

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.

Then I do this:

    foreach (var src in context.get_source_files()) {
        print("\n" + src.get_relative_filename() + ":\n");
        foreach (var node in src.get_nodes()) {
            print(node.to_string() + "\n");
            node.accept_children(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? Or maybe I just don't understand what CodeNode is?

It would be great to have more documentation describing the internal structure of Vala. Now I use valadoc 
generated from vala git, but comments are short and I don't get the whole picture of how it works. It would 
also be great if valadoc also generated some code map that shows relations of all the classes in one picture. 

Regards,
Dmitry


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