lua/func.h

45 lines
818 B
C
Raw Normal View History

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"
#include "lua.h"
1996-03-14 18:54:20 +03:00
#include "tree.h"
1995-10-04 17:20:26 +03:00
typedef struct LocVar
{
TaggedString *varname; /* NULL signals end of scope */
int line;
} LocVar;
1995-10-04 17:20:26 +03:00
/*
** Function Headers
1995-10-04 17:20:26 +03:00
*/
typedef struct TFunc
{
struct TFunc *next;
int marked;
1995-10-04 17:20:26 +03:00
int size;
Byte *code;
int lineDefined;
char *fileName;
LocVar *locvars;
1995-10-04 17:20:26 +03:00
} TFunc;
Long luaI_funccollector (void);
void luaI_insertfunction (TFunc *f);
void luaI_initTFunc (TFunc *f);
1996-03-14 18:54:20 +03:00
void luaI_freefunc (TFunc *f);
void luaI_registerlocalvar (TaggedString *varname, int line);
void luaI_unregisterlocalvar (int line);
void luaI_closelocalvars (TFunc *func);
char *luaI_getlocalname (TFunc *func, int local_number, int line);
1995-10-04 17:20:26 +03:00
#endif