File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ void Token::update_property_info()
153153 if ((MathLib::isInt (mStr ) || MathLib::isFloat (mStr )) && mStr .find (' _' ) == std::string::npos)
154154 tokType (eNumber);
155155 else
156- tokType (eName ); // assume it is a user defined literal
156+ tokType (eLiteral ); // assume it is a user defined literal
157157 } else if (mStr == " =" || mStr == " <<=" || mStr == " >>=" ||
158158 (mStr .size () == 2U && mStr [1 ] == ' =' && std::strchr (" +-*/%&^|" , mStr [0 ])))
159159 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 ));
@@ -9877,7 +9878,7 @@ void Tokenizer::simplifyAsm()
98779878 Token *endasm = tok->next ();
98789879 const Token *firstSemiColon = nullptr ;
98799880 int comment = 0 ;
9880- while (Token::Match (endasm, " %num%|%name%|,|:|;" ) || (endasm && endasm->linenr () == comment)) {
9881+ while (Token::Match (endasm, " %num%|%name%|,|:|;" ) || (endasm && ( endasm->isLiteral () || endasm-> linenr () == comment) )) {
98819882 if (Token::Match (endasm, " _asm|__asm|__endasm" ))
98829883 break ;
98839884 if (endasm->str () == " ;" ) {
You can’t perform that action at this time.
0 commit comments