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()
154154 if ((MathLib::isInt (mStr ) || MathLib::isFloat (mStr )) && mStr .find (' _' ) == std::string::npos)
155155 tokType (eNumber);
156156 else
157- tokType (eName ); // assume it is a user defined literal
157+ tokType (eLiteral ); // assume it is a user defined literal
158158 } else if (mStr == " =" || mStr == " <<=" || mStr == " >>=" ||
159159 (mStr .size () == 2U && mStr [1 ] == ' =' && std::strchr (" +-*/%&^|" , mStr [0 ])))
160160 tokType (eAssignmentOp);
Original file line number Diff line number Diff line change @@ -8869,6 +8869,7 @@ void Tokenizer::findGarbageCode() const
88698869 !Token::simpleMatch (tok->previous (), " ." ) &&
88708870 !Token::simpleMatch (tok->next (), " ." ) &&
88718871 !Token::Match (tok->previous (), " {|, . %name% =|.|[|{" ) &&
8872+ !(tok->previous () && tok->previous ()->isLiteral ()) &&
88728873 !Token::Match (tok->previous (), " , . %name%" )) {
88738874 if (!Token::Match (tok->previous (), " %name%|)|]|>|}" ))
88748875 syntaxError (tok, tok->strAt (-1 ) + " " + tok->str () + " " + tok->strAt (1 ));
@@ -9847,7 +9848,7 @@ void Tokenizer::simplifyAsm()
98479848 Token *endasm = tok->next ();
98489849 const Token *firstSemiColon = nullptr ;
98499850 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)) {
98519852 if (Token::Match (endasm, " _asm|__asm|__endasm" ))
98529853 break ;
98539854 if (endasm->str () == " ;" ) {
You can’t perform that action at this time.
0 commit comments