diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-09-29 11:34:11 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-09-29 11:35:43 +0200 |
commit | e40cd82f8c12ca3d0a3b0e9c89737acf940def44 (patch) | |
tree | b5a4688f2213166dde97d575d2afbd0d7935aa23 /src/shared/cplusplus/Token.h | |
parent | 1ce92c0ed6fad332c1ef7a1eb1d770fbd23932fb (diff) | |
download | qt-creator-e40cd82f8c12ca3d0a3b0e9c89737acf940def44.tar.gz |
Introduced T_CPP_COMMENT and T_CPP_DOXY_COMMENT to handle C++-style comments and improved CPPEditor::isInComment to handle the newly introduced tokens.
As side effect,this change should fix the regression we introduced in the "automagically" quote/brace insertion.
Diffstat (limited to 'src/shared/cplusplus/Token.h')
-rw-r--r-- | src/shared/cplusplus/Token.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/cplusplus/Token.h b/src/shared/cplusplus/Token.h index 861c21da27..00d42b7f89 100644 --- a/src/shared/cplusplus/Token.h +++ b/src/shared/cplusplus/Token.h @@ -59,6 +59,8 @@ enum Kind { T_EOF_SYMBOL = 0, T_ERROR, + T_CPP_COMMENT, + T_CPP_DOXY_COMMENT, T_COMMENT, T_DOXY_COMMENT, T_IDENTIFIER, @@ -297,7 +299,8 @@ public: { return f.kind >= T_FIRST_KEYWORD && f.kind < T_FIRST_QT_KEYWORD; } inline bool isComment() const - { return f.kind == T_COMMENT || f.kind == T_DOXY_COMMENT; } + { return f.kind == T_COMMENT || f.kind == T_DOXY_COMMENT || + f.kind == T_CPP_COMMENT || f.kind == T_CPP_DOXY_COMMENT; } inline bool isObjCAtKeyword() const { return f.kind >= T_FIRST_OBJC_AT_KEYWORD && f.kind <= T_LAST_OBJC_AT_KEYWORD; } |