aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/cpp.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-17 14:50:07 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-02-17 14:50:07 +0100
commitb091d8b4f34efe653b10bf681df6491ddb993527 (patch)
treeb1edcaf5055b5a97e9d8c280fb83c590a6645f19 /lib/lexers/cpp.tes
parent6efa2ebd0e44b758740120374d63874beda7ba6a (diff)
downloadsciteco-b091d8b4f34efe653b10bf681df6491ddb993527.tar.gz
The "cpp" lexer configuration has been split into "c.tes" and "cpp.tes"
* The keyword list is too different in C when compared to C++. The many additional keywords are annoying when editing plain C files. * Underscored C99 and C11 keywords (like _Bool) have been added to the "c.tes" lexer configuration. The C++ language does not contain these keywords. However, C has stdbool.h to define bool which is part of standard C++. * Therefore a macro "lexer.c.basekeywords" has been defined for all languages __directly__ derived (more or less supersets) of C. It contains most of the C99/C11 standard header shortcuts. * Objective C lexing is set up by c.tes since Objective C is a relatively strict superset of C. All Objective C keywords are handled by c.tes. Since they begin with "@", this should not cause problems when editing plain C files.
Diffstat (limited to 'lib/lexers/cpp.tes')
-rw-r--r--lib/lexers/cpp.tes33
1 files changed, 10 insertions, 23 deletions
diff --git a/lib/lexers/cpp.tes b/lib/lexers/cpp.tes
index 4a3a181..851e82a 100644
--- a/lib/lexers/cpp.tes
+++ b/lib/lexers/cpp.tes
@@ -1,7 +1,9 @@
-! C/C++ Lexing !
+!*
+ * C++ Lexing: Also used for all *.h headers since
+ * they cannot be distinguished.
+ *!
@[lexer.test.cpp]{
- :EN*.cQ*"S -1 '
:EN*.ccQ*"S -1 '
:EN*.cppQ*"S -1 '
:EN*.cxxQ*"S -1 '
@@ -10,34 +12,19 @@
:EN*.hppQ*"S -1 '
:EN*.hxxQ*"S -1 '
:EN*.ippQ*"S -1 '
- :EN*.mQ*"S -1 '
- :EN*.mmQ*"S -1 '
:EN*.smaQ*
}
@[lexer.set.cpp]{
ESSETLEXERLANGUAGEcpp
0ESSETKEYWORDS
- and and_eq asm auto bitand bitor bool break case catch char class compl
- const const_cast constexpr continue default delete do double dynamic_cast else
- enum explicit export extern false float for friend goto if inline int long
- mutable namespace new not not_eq operator or or_eq private protected public register
- reinterpret_cast return short signed sizeof static static_cast struct switch template this
- throw true try typedef typeid typename union unsigned using virtual void volatile
- wchar_t while xor xor_eq @class @defs @protocol @required @optional @end @interface
- @public @package @protected @private @property @implementation @synthesize @dynamic
- @throw @try @catch @finally @synchronized @autoreleasepool @selector @encode
- @compatibility_alias
+ Q[lexer.c.basekeywords]
+ and and_eq bitand bitor catch class compl const_cast constexpr delete dynamic_cast
+ explicit export friend mutable namespace new not not_eq operator or or_eq
+ private protected public reinterpret_cast static_cast template this
+ throw try typeid typename using virtual xor xor_eq
! Doxygen keywords !
- 2ESSETKEYWORDS
- a addindex addtogroup anchor arg attention author b brief bug c class code
- date def defgroup deprecated dontinclude e em endcode endhtmlonly endif
- endlatexonly endlink endverbatim enum example exception f$ f[ f] file fn hideinitializer
- htmlinclude htmlonly if image include ingroup internal invariant interface latexonly li
- line link mainpage name namespace nosubgrouping note overload p page par param
- param[in] param[out] post pre ref relates remarks return retval sa section see
- showinitializer since skip skipline struct subsection test throw throws todo typedef union
- until var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }
+ 2ESSETKEYWORDSQ[lexer.c.doxygenkeywords]
:M[color.comment],1M[color.set]
:M[color.comment],2M[color.set]
:M[color.comment],3M[color.set]