[Qt-creator] C++ Plugin: Check word against C++ Code Model
carel.combrink at gmail.com
Fri May 10 15:27:29 CEST 2013
I am busy with a Qt Creator plugin for the C++ Editor.
How do I use the C++ code model to check if a word is a function, class,
etc or 'just a word'? The plugin parses the comment tokens in a C++ Editor.
For an example: I have the following code:
/* This is function myFunction */
void myFunction(int arg1);
Parsing the comment gives me 4 words ("This", "is", "function" and
"myFunction"). How do I know that "This" is just a word while "myFunction"
is a token (part of the code model) in the scope of the comment?
My current, initial implementation checks a word against all tokens in the
file that the comment appears in. I would like to make use of the code
model instead, if possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator