refactor tokenizing

This commit is contained in:
Garux
2021-10-06 23:37:12 +03:00
parent fa1933fff5
commit 71c72527af
7 changed files with 92 additions and 160 deletions

View File

@@ -341,7 +341,7 @@ public:
std::size_t getColumn() const {
return m_scriptcolumn;
}
bool bufferContains( const char* str ){
bool bufferContains( const char* str ) const {
return m_istream.bufferContains( str );
}
};

View File

@@ -389,7 +389,7 @@ public:
c = *m_cur++;
return true;
}
bool bufferContains( const char* str ) const{
bool bufferContains( const char* str ) const {
return ( std::search( m_cur, m_end, str, str + strlen( str ) ) != m_end ) ||
( std::search( m_buffer2, m_end2, str, str + strlen( str ) ) != m_end2 );
}