Skip to content

Commit d0b0be7

Browse files
committed
Token: avoid always false control-flow lookup in update_property_info() [skip ci]
1 parent 714f30f commit d0b0be7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/token.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ void Token::update_property_info()
128128
else if (mTokensFrontBack.list.isKeyword(mStr)) {
129129
tokType(eKeyword);
130130
update_property_isStandardType();
131-
setFlag(fIsControlFlowKeyword, controlFlowKeywords.find(mStr) != controlFlowKeywords.end());
131+
if (mTokType != eType) // cannot be a control-float keyword when it is a type
132+
setFlag(fIsControlFlowKeyword, controlFlowKeywords.find(mStr) != controlFlowKeywords.end());
132133
}
133134
else if (mStr == "asm") { // TODO: not a keyword
134135
tokType(eKeyword);

0 commit comments

Comments
 (0)