diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Token.cpp | 246 |
1 files changed, 201 insertions, 45 deletions
diff --git a/src/libs/3rdparty/cplusplus/Token.cpp b/src/libs/3rdparty/cplusplus/Token.cpp index 2f6ce3d608d..4017855c7f3 100644 --- a/src/libs/3rdparty/cplusplus/Token.cpp +++ b/src/libs/3rdparty/cplusplus/Token.cpp @@ -24,64 +24,220 @@ using namespace CPlusPlus; const char *token_names[] = { - (""), ("<error>"), + (""), + ("<error>"), - ("<C++ comment>"), ("<C++ doxy comment>"), - ("<comment>"), ("<doxy comment>"), + // comments + ("<C++ comment>"), + ("<C++ doxy comment>"), + ("<comment>"), + ("<doxy comment>"), ("<identifier>"), + // literals ("<numeric literal>"), - ("<char literal>"), ("<wide char literal>"), ("<utf16 char literal>"), ("<utf32 char literal>"), - ("<string literal>"), ("<wide string literal>"), ("<utf8 string literal>"), - ("<utf16 string literal>"), ("<utf32 string literal>"), - ("<raw string literal>"), ("<raw wide string literal>"), ("<raw utf8 string literal>"), - ("<raw utf16 string literal>"), ("<raw utf32 string literal>"), - ("<@string literal>"), ("<angle string literal>"), - - ("&"), ("&&"), ("&="), ("->"), ("->*"), ("^"), ("^="), (":"), ("::"), - (","), ("/"), ("/="), ("."), ("..."), (".*"), ("="), ("=="), ("!"), - ("!="), (">"), (">="), (">>"), (">>="), ("{"), ("["), ("<"), ("<="), - ("<<"), ("<<="), ("("), ("-"), ("-="), ("--"), ("%"), ("%="), ("|"), - ("|="), ("||"), ("+"), ("+="), ("++"), ("#"), ("##"), ("?"), ("}"), - ("]"), (")"), (";"), ("*"), ("*="), ("~"), ("~="), - - ("alignas"), ("alignof"), ("asm"), ("auto"), ("break"), ("case"), ("catch"), - ("class"), ("const"), ("const_cast"), ("constexpr"), ("continue"), - ("decltype"), ("default"), - ("delete"), ("do"), ("dynamic_cast"), ("else"), ("enum"), - ("explicit"), ("export"), ("extern"), ("false"), ("for"), - ("friend"), ("goto"), ("if"), ("inline"), - ("mutable"), ("namespace"), ("new"), ("noexcept"), - ("nullptr"), ("operator"), ("private"), - ("protected"), ("public"), ("register"), ("reinterpret_cast"), - ("return"), ("sizeof"), ("static"), ("static_assert"), - ("static_cast"), ("struct"), ("switch"), ("template"), ("this"), ("thread_local"), - ("throw"), ("true"), ("try"), ("typedef"), ("typeid"), ("typename"), - ("union"), ("using"), ("virtual"), - ("volatile"), ("while"), + ("<char literal>"), + ("<wide char literal>"), + ("<utf16 char literal>"), + ("<utf32 char literal>"), + ("<string literal>"), + ("<wide string literal>"), + ("<utf8 string literal>"), + ("<utf16 string literal>"), + ("<utf32 string literal>"), + ("<raw string literal>"), + ("<raw wide string literal>"), + ("<raw utf8 string literal>"), + ("<raw utf16 string literal>"), + ("<raw utf32 string literal>"), + ("<@string literal>"), + ("<angle string literal>"), + + // operators + ("&"), + ("&&"), + ("&="), + ("->"), + ("->*"), + ("^"), + ("^="), + (":"), + ("::"), + (","), + ("/"), + ("/="), + ("."), + ("..."), + (".*"), + ("="), + ("=="), + ("!"), + ("!="), + (">"), + (">="), + (">>"), + (">>="), + ("{"), + ("["), + ("<"), + ("<="), + ("<<"), + ("<<="), + ("("), + ("-"), + ("-="), + ("--"), + ("%"), + ("%="), + ("|"), + ("|="), + ("||"), + ("+"), + ("+="), + ("++"), + ("#"), + ("##"), + ("?"), + ("}"), + ("]"), + (")"), + (";"), + ("*"), + ("*="), + ("~"), + ("~="), + + // keywords + ("alignas"), + ("alignof"), + ("asm"), + ("auto"), + ("break"), + ("case"), + ("catch"), + ("class"), + ("const"), + ("const_cast"), + ("constexpr"), + ("continue"), + ("decltype"), + ("default"), + ("delete"), + ("do"), + ("dynamic_cast"), + ("else"), + ("enum"), + ("explicit"), + ("export"), + ("extern"), + ("false"), + ("for"), + ("friend"), + ("goto"), + ("if"), + ("inline"), + ("mutable"), + ("namespace"), + ("new"), + ("noexcept"), + ("nullptr"), + ("operator"), + ("private"), + ("protected"), + ("public"), + ("register"), + ("reinterpret_cast"), + ("return"), + ("sizeof"), + ("static"), + ("static_assert"), + ("static_cast"), + ("struct"), + ("switch"), + ("template"), + ("this"), + ("thread_local"), + ("throw"), + ("true"), + ("try"), + ("typedef"), + ("typeid"), + ("typename"), + ("union"), + ("using"), + ("virtual"), + ("volatile"), + ("while"), // gnu - ("__attribute__"), ("__thread"), ("__typeof__"), + ("__attribute__"), + ("__thread"), + ("__typeof__"), // objc @keywords - ("@catch"), ("@class"), ("@compatibility_alias"), ("@defs"), ("@dynamic"), - ("@encode"), ("@end"), ("@finally"), ("@implementation"), ("@interface"), - ("@not_keyword"), ("@optional"), ("@package"), ("@private"), ("@property"), - ("@protected"), ("@protocol"), ("@public"), ("@required"), ("@selector"), - ("@synchronized"), ("@synthesize"), ("@throw"), ("@try"), + ("@catch"), + ("@class"), + ("@compatibility_alias"), + ("@defs"), + ("@dynamic"), + ("@encode"), + ("@end"), + ("@finally"), + ("@implementation"), + ("@interface"), + ("@not_keyword"), + ("@optional"), + ("@package"), + ("@private"), + ("@property"), + ("@protected"), + ("@protocol"), + ("@public"), + ("@required"), + ("@selector"), + ("@synchronized"), + ("@synthesize"), + ("@throw"), + ("@try"), // Primitive types - ("bool"), ("char"), ("char16_t"), ("char32_t"), ("double"), ("float"), ("int"), - ("long"), ("short"), ("signed"), ("unsigned"), ("void"), ("wchar_t"), + ("bool"), + ("char"), + ("char16_t"), + ("char32_t"), + ("double"), + ("float"), + ("int"), + ("long"), + ("short"), + ("signed"), + ("unsigned"), + ("void"), + ("wchar_t"), // Qt keywords - ("emit"), ("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"), - ("Q_FOREACH"), ("Q_D"), ("Q_Q"), - ("Q_INVOKABLE"), ("Q_PROPERTY"), ("T_Q_PRIVATE_PROPERTY"), - ("Q_INTERFACES"), ("Q_EMIT"), ("Q_ENUMS"), ("Q_FLAGS"), - ("Q_PRIVATE_SLOT"), ("Q_DECLARE_INTERFACE"), ("Q_OBJECT"), ("Q_GADGET"), - + ("emit"), + ("SIGNAL"), + ("SLOT"), + ("Q_SIGNAL"), + ("Q_SLOT"), + ("signals"), + ("slots"), + ("Q_FOREACH"), + ("Q_D"), + ("Q_Q"), + ("Q_INVOKABLE"), + ("Q_PROPERTY"), + ("T_Q_PRIVATE_PROPERTY"), + ("Q_INTERFACES"), + ("Q_EMIT"), + ("Q_ENUMS"), + ("Q_FLAGS"), + ("Q_PRIVATE_SLOT"), + ("Q_DECLARE_INTERFACE"), + ("Q_OBJECT"), + ("Q_GADGET"), }; void Token::reset() |