MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / FormatSyntaxError

Function FormatSyntaxError

src/twparser/yylex.cpp:549–561  ·  view source on GitHub ↗

since i've replaced this with a non-va_arg yyerror, call this when you hit a syntax error and then call the non-va_arg yyerror with the result

Source from the content-addressed store, hash-verified

547// call this when you hit a syntax error and then call
548// the non-va_arg yyerror with the result
549std::string FormatSyntaxError( char ch, const char* pszAdditionalMsg = NULL )
550{
551 // TODO:BAM MKS will call yyerror with narrow-char hard-coded string, so if
552 // we do it here as well, I suppose that's OK. This should be eventually
553 // corrected.
554
555 std::ostringstream ssErr;
556 ssErr << "Syntax error: \'" << ch << "\'";
557 if( pszAdditionalMsg )
558 ssErr << ", " << pszAdditionalMsg;
559
560 return ssErr.str();
561}
562
563// saves typing
564#define TRACE_RETURN(x) lextrace(_T(#x)); return x

Callers 1

yylexMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected