mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* all except pol * pol and includes under defines * something weird has happened * remove own folder from include searchpath * fixed remaining, adapted include style for external headers * missing include
21 lines
419 B
C++
21 lines
419 B
C++
#include "bscript/compiler/file/ConformingCharStream.h"
|
|
|
|
#include <cctype>
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
size_t ConformingCharStream::LA( ssize_t i )
|
|
{
|
|
size_t c = stream->LA( i );
|
|
if ( c == CharStream::EOF )
|
|
{
|
|
return c;
|
|
}
|
|
|
|
if ( c < 128 ) // to avoid std::tolower "undefined behavior"
|
|
return std::tolower( static_cast<unsigned char>( c ) );
|
|
|
|
return c;
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|