Qt Creator: checking syntax & highlighting
-
Hello, guys.
I use QtCreator for editiing pure-C code. In those code I have some statements, which exist in pure-C, but exist in C++, e.g.:
namespace is not keyword in C, but it's keyword in C++.
At this place QtCreator check code and tells me, that I have a syntax error in this place, e.g.
const char *namespace
Does any way exist in QtCreator to set list of keywords, that must be checked by QtCreator and will be highlighted?
-
I just answered on my questions myself.
QtCreator has Keywords.cpp file located at src/libs/cplusplus/Keywords.cpp
In those file QtCreator check given word and determine it's type (keyword asthis
,namespace
of identifier).So, I comment code, which checks not-pure-C keywords, make those lib and install to qtcreator/lib/ directory. It works for me.