Skip to content

Commit ae3012f

Browse files
committed
Token: avoid always false control-flow lookup in update_property_info()
1 parent c485ac4 commit ae3012f

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)