From 527a9bd526d854d3f43b633a94af6dea642297db Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 30 Nov 2009 16:30:21 +0100 Subject: Inital support for Q_D/Q_Q declarations. --- src/shared/cplusplus/Keywords.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/shared/cplusplus/Keywords.cpp') diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp index 48af124473..6da25125f7 100644 --- a/src/shared/cplusplus/Keywords.cpp +++ b/src/shared/cplusplus/Keywords.cpp @@ -65,7 +65,7 @@ static inline int classify2(const char *s, bool) { return T_IDENTIFIER; } -static inline int classify3(const char *s, bool) { +static inline int classify3(const char *s, bool q) { if (s[0] == 'a') { if (s[1] == 's') { if (s[2] == 'm') { @@ -101,6 +101,16 @@ static inline int classify3(const char *s, bool) { } } } + else if (q && s[0] == 'Q') { + if (s[1] == '_') { + if (s[2] == 'D') { + return T_Q_D; + } + else if (s[2] == 'Q') { + return T_Q_Q; + } + } + } return T_IDENTIFIER; } -- cgit v1.2.1