[Qt-creator] [baremetal] Add additional compiler keywords to CPP editor
denis.shienkov at gmail.com
Tue Apr 23 13:34:25 CEST 2019
пт, 19 апр. 2019 г. в 13:34, Denis Shienkov <denis.shienkov at gmail.com>:
> Hi guys.
> How I can add an additional compiler keywords (e.g. present in KEIL C51
> compiler, like: idata, xdata, pdata and others) to the QtC editor. Because
> otherwise, the QtC highlids this keywords as an errors, f.e:
> int main(void)
> unsigned char xdata variable; /// <<< HERE an 'xdata' is a C51
> compiler's keyword.
> I would to add this keywords only to 'baremetal' plugin... Also, a set of
> this keywords is different for each bare-metal toolchain (e.g. on KEIL, on
> IAR it is different).
> I looked the QtC sources and I see the 3rd Token class, but that class is
> a common for all compilers. Besides, the default CppHighlighter class is rigidly
> tied to the Token, and no any chance to flexible set any new keyword there.
> For me, it would be good to be possible to automatically set the keywords,
> depends on current CPP toolchain. E.g. if I will use the IAR toolchain,
> then CppEditor will know the IAR keywords... If I want to switch to the
> KEIL toolchain, then the CppEditor also will switch the syntax highliding
> to the KEIL keywords.
> Is it possible to implement this behavior at all?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator