String buffer refactoring, part 3.

Switch to pointers for start/end of buffer in lexer.
This commit is contained in:
Mike Pall
2013-02-28 02:31:30 +01:00
parent 87c51e7f57
commit 3c0157f426
4 changed files with 50 additions and 62 deletions

View File

@@ -54,11 +54,11 @@ typedef struct LexState {
struct lua_State *L; /* Lua state. */
TValue tokval; /* Current token value. */
TValue lookaheadval; /* Lookahead token value. */
const char *p; /* Current position in input buffer. */
const char *pe; /* End of input buffer. */
LexChar c; /* Current character. */
LexToken tok; /* Current token. */
LexToken lookahead; /* Lookahead token. */
MSize n; /* Bytes left in input buffer. */
const char *p; /* Current position in input buffer. */
SBuf sb; /* String buffer for tokens. */
lua_Reader rfunc; /* Reader callback. */
void *rdata; /* Reader callback data. */