File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ void Token::update_property_info()
154
154
if ((MathLib::isInt (mStr ) || MathLib::isFloat (mStr )) && mStr .find (' _' ) == std::string::npos)
155
155
tokType (eNumber);
156
156
else
157
- tokType (eName ); // assume it is a user defined literal
157
+ tokType (eLiteral ); // assume it is a user defined literal
158
158
} else if (mStr == " =" || mStr == " <<=" || mStr == " >>=" ||
159
159
(mStr .size () == 2U && mStr [1 ] == ' =' && std::strchr (" +-*/%&^|" , mStr [0 ])))
160
160
tokType (eAssignmentOp);
Original file line number Diff line number Diff line change @@ -8869,6 +8869,7 @@ void Tokenizer::findGarbageCode() const
8869
8869
!Token::simpleMatch (tok->previous (), " ." ) &&
8870
8870
!Token::simpleMatch (tok->next (), " ." ) &&
8871
8871
!Token::Match (tok->previous (), " {|, . %name% =|.|[|{" ) &&
8872
+ !(tok->previous () && tok->previous ()->isLiteral ()) &&
8872
8873
!Token::Match (tok->previous (), " , . %name%" )) {
8873
8874
if (!Token::Match (tok->previous (), " %name%|)|]|>|}" ))
8874
8875
syntaxError (tok, tok->strAt (-1 ) + " " + tok->str () + " " + tok->strAt (1 ));
@@ -9847,7 +9848,7 @@ void Tokenizer::simplifyAsm()
9847
9848
Token *endasm = tok->next ();
9848
9849
const Token *firstSemiColon = nullptr ;
9849
9850
int comment = 0 ;
9850
- while (Token::Match (endasm, " %num%|%name%|,|:|;" ) || (endasm && endasm->linenr () == comment)) {
9851
+ while (Token::Match (endasm, " %num%|%name%|,|:|;" ) || (endasm && endasm->isLiteral ()) || (endasm && endasm-> linenr () == comment)) {
9851
9852
if (Token::Match (endasm, " _asm|__asm|__endasm" ))
9852
9853
break ;
9853
9854
if (endasm->str () == " ;" ) {
You can’t perform that action at this time.
0 commit comments