Of course, I don't actually need it to highlight anything, I'll take care of that, however, it would be great if there would be a library that can parse text and can in an abstract manner tell me which words should I highlight and how should I treat them (as functions, vars, etc). I think (not sure) Clang would be an option, but seems really heavy duty for my purposes.

有帮助吗?

解决方案

Yes libclang is the way to go.

Watch this video (captured at 2010 LLVM Developers' Meeting) for more info, which presents the libclang API and should give you a really good overview of how to use the API.

You may probably be interested in the others videos here too.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top