TokenStream: Remove scriptcall member
parent
b745b2eb3f
commit
95c85fdb9f
|
@ -31,7 +31,6 @@
|
|||
// read-write
|
||||
// skipeol: Skip line end tokens.
|
||||
// skipspc: Skip whitespace tokens.
|
||||
// scriptcall: Calls Lth_TokenGet via a script to reduce instructions. Slow.
|
||||
//
|
||||
typedef struct Lth_TokenStream
|
||||
{
|
||||
|
@ -41,7 +40,6 @@ typedef struct Lth_TokenStream
|
|||
|
||||
bool skipeol;
|
||||
bool skipspc;
|
||||
bool scriptcall;
|
||||
} Lth_TokenStream;
|
||||
|
||||
|
||||
|
|
|
@ -133,14 +133,6 @@ static FILE *Lth_TokenFileStreamOpen(void *data, size_t size)
|
|||
return fopencookie(cookie, "r", io_funcs);
|
||||
}
|
||||
|
||||
//
|
||||
// Lth_TokenGet_Script
|
||||
//
|
||||
Lth_ScriptCall static void Lth_TokenGet_Script(FILE *fp, Lth_Token *out)
|
||||
{
|
||||
Lth_TokenGet(fp, out);
|
||||
}
|
||||
|
||||
//
|
||||
// Lth_TokenStreamGrab
|
||||
//
|
||||
|
@ -148,11 +140,7 @@ static void Lth_TokenStreamGrab(Lth_TokenStream *stream)
|
|||
{
|
||||
if(feof(stream->fp)) return;
|
||||
|
||||
bool scriptcall = stream->scriptcall;
|
||||
|
||||
do
|
||||
if(!scriptcall) Lth_TokenGet(stream->fp, &stream->tokbuf);
|
||||
else Lth_TokenGet_Script(stream->fp, &stream->tokbuf);
|
||||
do Lth_TokenGet(stream->fp, &stream->tokbuf);
|
||||
while((stream->skipspc && stream->tokbuf.type == Lth_TOK_Space) ||
|
||||
(stream->skipeol && stream->tokbuf.type == Lth_TOK_LnEnd));
|
||||
|
||||
|
|
Loading…
Reference in New Issue