diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-07 16:10:27 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-07 16:10:27 -0200 |
commit | 5a3a1fe458a7eab402f5386e4dcb8282c94ff068 (patch) | |
tree | fc315159d0b00d3e726c0a538e40b6acdaa3e013 /func.h | |
parent | 56fb06b6f5eaea4f3dba32af1cc476a99b678497 (diff) | |
download | lua-5a3a1fe458a7eab402f5386e4dcb8282c94ff068.tar.gz lua-5a3a1fe458a7eab402f5386e4dcb8282c94ff068.tar.bz2 lua-5a3a1fe458a7eab402f5386e4dcb8282c94ff068.zip |
debug interface functions to manipulated local variables:
"lua_getlocal" and "lua_setlocal".
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 |