diff options
Diffstat (limited to 'func.h')
-rw-r--r-- | func.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -4,8 +4,15 @@ | |||
4 | #include "types.h" | 4 | #include "types.h" |
5 | #include "lua.h" | 5 | #include "lua.h" |
6 | 6 | ||
7 | typedef struct LocVar | ||
8 | { | ||
9 | TreeNode *varname; /* NULL signals end of scope */ | ||
10 | int line; | ||
11 | } LocVar; | ||
12 | |||
13 | |||
7 | /* | 14 | /* |
8 | ** Header para funcoes. | 15 | ** Function Headers |
9 | */ | 16 | */ |
10 | typedef struct TFunc | 17 | typedef struct TFunc |
11 | { | 18 | { |
@@ -15,10 +22,17 @@ typedef struct TFunc | |||
15 | Byte *code; | 22 | Byte *code; |
16 | int lineDefined; | 23 | int lineDefined; |
17 | char *fileName; | 24 | char *fileName; |
25 | LocVar *locvars; | ||
18 | } TFunc; | 26 | } TFunc; |
19 | 27 | ||
20 | Long luaI_funccollector (void); | 28 | Long luaI_funccollector (void); |
21 | void luaI_insertfunction (TFunc *f); | 29 | void luaI_insertfunction (TFunc *f); |
22 | 30 | ||
31 | void luaI_initTFunc (TFunc *f); | ||
32 | |||
33 | void luaI_registerlocalvar (TreeNode *varname, int line); | ||
34 | void luaI_unregisterlocalvar (int line); | ||
35 | void luaI_closelocalvars (TFunc *func); | ||
36 | char *luaI_getlocalname (TFunc *func, int local_number, int line); | ||
23 | 37 | ||
24 | #endif | 38 | #endif |