File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ static const std::unordered_set<std::string> controlFlowKeywords = {
107107
108108void Token::update_property_info ()
109109{
110- setFlag (fIsControlFlowKeyword , controlFlowKeywords. find ( mStr ) != controlFlowKeywords. end () );
110+ setFlag (fIsControlFlowKeyword , false );
111111 // TODO: clear fIsLong
112112 isStandardType (false );
113113
@@ -125,8 +125,13 @@ void Token::update_property_info()
125125 else if (std::isalpha ((unsigned char )mStr [0 ]) || mStr [0 ] == ' _' || mStr [0 ] == ' $' ) { // Name
126126 if (mImpl ->mVarId )
127127 tokType (eVariable);
128- else if (mTokensFrontBack .list .isKeyword (mStr ) || mStr == " asm " ) // TODO: not a keyword
128+ else if (mTokensFrontBack .list .isKeyword (mStr )) {
129129 tokType (eKeyword);
130+ setFlag (fIsControlFlowKeyword , controlFlowKeywords.find (mStr ) != controlFlowKeywords.end ());
131+ }
132+ else if (mStr == " asm" ) { // TODO: not a keyword
133+ tokType (eKeyword);
134+ }
130135 else if (mTokType != eVariable && mTokType != eFunction && mTokType != eType && mTokType != eKeyword)
131136 tokType (eName);
132137 } else if (simplecpp::Token::isNumberLike (mStr )) {
You can’t perform that action at this time.
0 commit comments