mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 17:09:19 +02:00
Add once again parser optimizations
This commit is contained in:
@@ -45,11 +45,14 @@ class cParser //: public std::stringstream
|
||||
inline
|
||||
void
|
||||
ignoreToken() {
|
||||
readToken(); };
|
||||
std::string out;
|
||||
readToken(out); };
|
||||
inline
|
||||
bool
|
||||
expectToken( std::string const &Value ) {
|
||||
return readToken() == Value; };
|
||||
std::string out;
|
||||
readToken(out);
|
||||
return out == Value; };
|
||||
inline
|
||||
bool
|
||||
eof() {
|
||||
@@ -66,7 +69,6 @@ class cParser //: public std::stringstream
|
||||
return m_autoclear; }
|
||||
bool
|
||||
getTokens( unsigned int Count = 1, bool ToLower = true, char const *Break = "\n\r\t ;" );
|
||||
std::string readTokenFromDelegate(bool ToLower, const char *Break);
|
||||
std::string readTokenFromStream(bool ToLower, const char *Break);
|
||||
void stripFirstTokenBOM(std::string &token, bool ToLower, const char *Break);
|
||||
void substituteParameters(std::string &token, bool ToLower);
|
||||
@@ -103,7 +105,7 @@ class cParser //: public std::stringstream
|
||||
void startIncludeFromParser(cParser &srcParser, bool ToLower, std::string includefile);
|
||||
bool handleIncludeIfPresent(std::string &token, bool ToLower, const char *Break);
|
||||
// methods:
|
||||
std::string readToken(bool ToLower = true, const char *Break = "\n\r\t ;");
|
||||
void readToken(std::string& out, bool ToLower = true, const char *Break = "\n\r\t ;");
|
||||
static std::vector<std::string> readParameters( cParser &Input );
|
||||
std::string readQuotes( char const Quote = '\"' );
|
||||
void skipComment( std::string const &Endmark );
|
||||
|
||||
Reference in New Issue
Block a user