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