1996-03-08 09:04:04 -03:00
|
|
|
/*
|
1996-03-14 12:54:20 -03:00
|
|
|
** $Id: func.h,v 1.7 1996/03/08 12:04:04 roberto Exp roberto $
|
1996-03-08 09:04:04 -03:00
|
|
|
*/
|
|
|
|
|
1995-10-04 11:20:26 -03:00
|
|
|
#ifndef func_h
|
|
|
|
#define func_h
|
|
|
|
|
|
|
|
#include "types.h"
|
1995-10-26 12:21:56 -02:00
|
|
|
#include "lua.h"
|
1996-03-14 12:54:20 -03:00
|
|
|
#include "tree.h"
|
1995-10-04 11:20:26 -03:00
|
|
|
|
1996-02-07 16:10:27 -02:00
|
|
|
typedef struct LocVar
|
|
|
|
{
|
1996-02-12 15:32:40 -03:00
|
|
|
TaggedString *varname; /* NULL signals end of scope */
|
1996-02-07 16:10:27 -02:00
|
|
|
int line;
|
|
|
|
} LocVar;
|
|
|
|
|
|
|
|
|
1995-10-04 11:20:26 -03:00
|
|
|
/*
|
1996-02-07 16:10:27 -02:00
|
|
|
** Function Headers
|
1995-10-04 11:20:26 -03:00
|
|
|
*/
|
|
|
|
typedef struct TFunc
|
|
|
|
{
|
|
|
|
struct TFunc *next;
|
1996-02-26 14:06:39 -03:00
|
|
|
int marked;
|
1995-10-04 11:20:26 -03:00
|
|
|
int size;
|
|
|
|
Byte *code;
|
1995-10-17 09:58:41 -02:00
|
|
|
int lineDefined;
|
|
|
|
char *fileName;
|
1996-02-07 16:10:27 -02:00
|
|
|
LocVar *locvars;
|
1995-10-04 11:20:26 -03:00
|
|
|
} TFunc;
|
|
|
|
|
|
|
|
Long luaI_funccollector (void);
|
|
|
|
void luaI_insertfunction (TFunc *f);
|
|
|
|
|
1996-02-07 16:10:27 -02:00
|
|
|
void luaI_initTFunc (TFunc *f);
|
1996-03-14 12:54:20 -03:00
|
|
|
void luaI_freefunc (TFunc *f);
|
1996-02-07 16:10:27 -02:00
|
|
|
|
1996-02-12 15:32:40 -03:00
|
|
|
void luaI_registerlocalvar (TaggedString *varname, int line);
|
1996-02-07 16:10:27 -02:00
|
|
|
void luaI_unregisterlocalvar (int line);
|
|
|
|
void luaI_closelocalvars (TFunc *func);
|
|
|
|
char *luaI_getlocalname (TFunc *func, int local_number, int line);
|
1995-10-26 12:21:56 -02:00
|
|
|
|
1995-10-04 11:20:26 -03:00
|
|
|
#endif
|