File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ static const std::unordered_set<std::string> controlFlowKeywords = {
107
107
108
108
void Token::update_property_info ()
109
109
{
110
- setFlag (fIsControlFlowKeyword , controlFlowKeywords. find ( mStr ) != controlFlowKeywords. end () );
110
+ setFlag (fIsControlFlowKeyword , false );
111
111
// TODO: clear fIsLong
112
112
isStandardType (false );
113
113
@@ -125,8 +125,13 @@ void Token::update_property_info()
125
125
else if (std::isalpha ((unsigned char )mStr [0 ]) || mStr [0 ] == ' _' || mStr [0 ] == ' $' ) { // Name
126
126
if (mImpl ->mVarId )
127
127
tokType (eVariable);
128
- else if (mTokensFrontBack .list .isKeyword (mStr ) || mStr == " asm " ) // TODO: not a keyword
128
+ else if (mTokensFrontBack .list .isKeyword (mStr )) {
129
129
tokType (eKeyword);
130
+ setFlag (fIsControlFlowKeyword , controlFlowKeywords.find (mStr ) != controlFlowKeywords.end ());
131
+ }
132
+ else if (mStr == " asm" ) { // TODO: not a keyword
133
+ tokType (eKeyword);
134
+ }
130
135
// TODO: remove condition? appears to be (no longer necessary) protection for reset of varids in Tokenizer::setVarId()
131
136
else if (mTokType != eVariable && mTokType != eFunction && mTokType != eType && mTokType != eKeyword)
132
137
tokType (eName);
You can’t perform that action at this time.
0 commit comments