lua-users home
lua-l archive

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

Congratulations! A so long time's waiting :) but if you want use it in
lqt, maybe add a prebuild executable is better, clang source is so
big, compile it is slow :(

maybe lqt can direct depend luaclang project, so we can download
luaclang's rebuild ourselves, that's also good.

Xavier Wang.

2012/7/12 Michal Kottman <>:
> Hi list,
> being a little frustrated with the inability to fix cpptoxml used in
> lqt to parse Qt headers, and seeing some amazing videos about the
> Clang compiler and its API, I decided to write a binding to libclang
> [1] - luaclang [2].
> luaclang is a Lua API over libclang (not all functionality provided,
> but most), which allows you to traverse the AST, gather classes,
> methods, access type information, etc. Using some C++ annotation magic
> it is even able to correctly determine Qt signals and slots. It is
> able to process the entire Qt framework and gather info for all
> classes, methods and arguments, which I want to use to make lqt better
> and future-proof.
> A sample file cindex.lua is provided, which takes in parameters as you
> would pass to a compiler to compile a single file, and it produces a
> SQLite database which you can query. I used it to query libclang
> itself to see if there are any important functions I missed :)
> I hope this tool will be useful for binding-generator writers, as you
> no longer have to parse headers manually and/or parse documentation,
> when you have the power of a robust C/C++ parser available in Lua :)
> [1]
> [2]