[Vala] lexical analysis using libvala



Hi!

I'm working on vala plugin for netbeans, and have some questions regarding
libvala and parsing (scanning) using libvala. My existing version of plugin
is implemented using antlr and it's not easy to maintain and support all the
features of vala.

So I've come up with the idea to use libvala to parse files and integrate it
somehow with java part of plugin.

Now i'm trying to parse vala files using libvala, and i've made some
progress but got problems with parsing of code comments.

Here is my tryout to parse vala files:
https://github.com/carbonfx/netbeans-valaproject/blob/libvala/plugin/libvalaproxy/src/valaparser/vala-parser.vala
I've made some hacks to get comments from source, and it doesn't looks right
for me. For example I'm calling scanner.parse_file_comments(); before each
call of read_token method.

Is there any way to get comments and correct line and column number for
comments using Scanner class?

-- 
Sincerely,
Magomed


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