diff --git a/lithos_c/inc/Lth_tokenstream.h b/lithos_c/inc/Lth_tokenstream.h index 9688437..9835cfe 100644 --- a/lithos_c/inc/Lth_tokenstream.h +++ b/lithos_c/inc/Lth_tokenstream.h @@ -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; diff --git a/lithos_c/src/tokenstream.c b/lithos_c/src/tokenstream.c index 2f47745..e0e1ee3 100644 --- a/lithos_c/src/tokenstream.c +++ b/lithos_c/src/tokenstream.c @@ -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));