1
0
Fork 0

TokenStream: Remove scriptcall member

master
Marrub 2016-10-21 14:44:37 -04:00
parent b745b2eb3f
commit 95c85fdb9f
2 changed files with 1 additions and 15 deletions

View File

@ -31,7 +31,6 @@
// read-write // read-write
// skipeol: Skip line end tokens. // skipeol: Skip line end tokens.
// skipspc: Skip whitespace tokens. // skipspc: Skip whitespace tokens.
// scriptcall: Calls Lth_TokenGet via a script to reduce instructions. Slow.
// //
typedef struct Lth_TokenStream typedef struct Lth_TokenStream
{ {
@ -41,7 +40,6 @@ typedef struct Lth_TokenStream
bool skipeol; bool skipeol;
bool skipspc; bool skipspc;
bool scriptcall;
} Lth_TokenStream; } Lth_TokenStream;

View File

@ -133,14 +133,6 @@ static FILE *Lth_TokenFileStreamOpen(void *data, size_t size)
return fopencookie(cookie, "r", io_funcs); 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 // Lth_TokenStreamGrab
// //
@ -148,11 +140,7 @@ static void Lth_TokenStreamGrab(Lth_TokenStream *stream)
{ {
if(feof(stream->fp)) return; if(feof(stream->fp)) return;
bool scriptcall = stream->scriptcall; do Lth_TokenGet(stream->fp, &stream->tokbuf);
do
if(!scriptcall) Lth_TokenGet(stream->fp, &stream->tokbuf);
else Lth_TokenGet_Script(stream->fp, &stream->tokbuf);
while((stream->skipspc && stream->tokbuf.type == Lth_TOK_Space) || while((stream->skipspc && stream->tokbuf.type == Lth_TOK_Space) ||
(stream->skipeol && stream->tokbuf.type == Lth_TOK_LnEnd)); (stream->skipeol && stream->tokbuf.type == Lth_TOK_LnEnd));