add class SingleQuoted

This commit is contained in:
Garux
2025-10-07 00:16:53 +05:00
parent c5ced679f4
commit 7ea9546cdf
17 changed files with 46 additions and 30 deletions
+2 -2
View File
@@ -222,7 +222,7 @@ inline bool string_parse_size( const char* string, std::size_t& i ){
#define RETURN_FALSE_IF_FAIL( expression ) do{ if ( !expression ) { return false; } }while( false )
inline void Tokeniser_unexpectedError( Tokeniser& tokeniser, const char* token, const char* expected ){
globalErrorStream() << tokeniser.getLine() << ':' << tokeniser.getColumn() << ": parse error at '" << ( token != 0 ? token : "#EOF" ) << "': expected '" << expected << "'\n";
globalErrorStream() << tokeniser.getLine() << ':' << tokeniser.getColumn() << ": parse error at " << SingleQuoted( token != 0 ? token : "#EOF" ) << ": expected " << SingleQuoted( expected ) << '\n';
}
@@ -233,7 +233,7 @@ inline bool Tokeniser_getFloat( Tokeniser& tokeniser, float& f ){
}
//fallback for 1.#IND 1.#INF 1.#QNAN cases, happening sometimes after texture locking algorithms
else if ( token != 0 && strstr( token, ".#" ) ) {
globalWarningStream() << "Warning: " << tokeniser.getLine() << ':' << tokeniser.getColumn() << ": expected parse problem at '" << token << "': wanted '#number'\nProcessing anyway\n";
globalWarningStream() << "Warning: " << tokeniser.getLine() << ':' << tokeniser.getColumn() << ": expected parse problem at " << SingleQuoted( token ) << ": wanted '#number'\nProcessing anyway\n";
// *strstr( token, ".#" ) = '\0';
return true;
}