Ejemplo n.º 1
0
void SQLexer::Next()
{
    SQInteger t = _readf(_up);
#ifdef SQUIRREL_SP
    if(t > MAX_UCSCHAR) Error(_SC("Invalid character"));
    if(t != 0) {
        if(t <= MAX_CHAR) {
            _currdata = (LexChar)t;
            _currdata2 = (LexChar)_SC('\0');
        }
        else {
            _currdata = (LexChar)UCSCHAR_TO_HIGH_SURROGATE(t);
            _currdata2 = (LexChar)UCSCHAR_TO_LOW_SURROGATE(t);
        }
        return;
    }
#else
    if(t > MAX_CHAR) Error(_SC("Invalid character"));
    if(t != 0) {
        _currdata = (LexChar)t;
        return;
    }
#endif
    _currdata = SQUIRREL_EOB;
    _reached_eof = SQTrue;
}
Ejemplo n.º 2
0
void SQLexer::Next()
{
	SQInteger t = _readf(_up);
	if(t > MAX_CHAR) Error(_SC("Invalid character"));
	if(t != 0) {
		_currdata = (LexChar)t;
		return;
	}
	_currdata = SQUIRREL_EOB;
}