aboutsummaryrefslogtreecommitdiff
path: root/src/lj_lex.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-02-08 05:26:52 +0100
committerMike Pall <mike>2010-02-08 05:26:52 +0100
commit60b5af44222fff87a7184365a7f49654032d4cbf (patch)
tree9c108bc330f16ef8914c3bea84b5170000788932 /src/lj_lex.h
parent1307f49137f328b0880c736644755428d84be0ba (diff)
downloadluajit-60b5af44222fff87a7184365a7f49654032d4cbf.tar.gz
luajit-60b5af44222fff87a7184365a7f49654032d4cbf.tar.bz2
luajit-60b5af44222fff87a7184365a7f49654032d4cbf.zip
Redesign of prototype generation, part 1: varinfo and uvname.
Use a growable, per-chunk variable stack. Collect varinfo/uvname for prototype at the end.
Diffstat (limited to 'src/lj_lex.h')
-rw-r--r--src/lj_lex.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_lex.h b/src/lj_lex.h
index cc5d5a9f..ee183b40 100644
--- a/src/lj_lex.h
+++ b/src/lj_lex.h
@@ -50,10 +50,14 @@ typedef struct LexState {
50 BCLine lastline; /* Line of last token. */ 50 BCLine lastline; /* Line of last token. */
51 GCstr *chunkname; /* Current chunk name (interned string). */ 51 GCstr *chunkname; /* Current chunk name (interned string). */
52 const char *chunkarg; /* Chunk name argument. */ 52 const char *chunkarg; /* Chunk name argument. */
53 VarInfo *vstack; /* Stack for names and extents of local variables. */
54 MSize sizevstack; /* Size of variable stack. */
55 MSize vtop; /* Top of variable stack. */
53 uint32_t level; /* Syntactical nesting level. */ 56 uint32_t level; /* Syntactical nesting level. */
54} LexState; 57} LexState;
55 58
56LJ_FUNC void lj_lex_start(lua_State *L, LexState *ls); 59LJ_FUNC void lj_lex_setup(lua_State *L, LexState *ls);
60LJ_FUNC void lj_lex_cleanup(lua_State *L, LexState *ls);
57LJ_FUNC void lj_lex_next(LexState *ls); 61LJ_FUNC void lj_lex_next(LexState *ls);
58LJ_FUNC LexToken lj_lex_lookahead(LexState *ls); 62LJ_FUNC LexToken lj_lex_lookahead(LexState *ls);
59LJ_FUNC const char *lj_lex_token2str(LexState *ls, LexToken token); 63LJ_FUNC const char *lj_lex_token2str(LexState *ls, LexToken token);