1996-03-08 09:04:04 -03:00
|
|
|
/*
|
1997-07-30 19:00:50 -03:00
|
|
|
** $Id: func.h,v 1.11 1997/07/29 20:38:45 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
|
|
|
Byte *code;
|
1995-10-17 09:58:41 -02:00
|
|
|
int lineDefined;
|
1997-07-30 19:00:50 -03:00
|
|
|
TaggedString *fileName;
|
|
|
|
struct TObject *consts;
|
|
|
|
int nconsts;
|
1996-02-07 16:10:27 -02:00
|
|
|
LocVar *locvars;
|
1995-10-04 11:20:26 -03:00
|
|
|
} TFunc;
|
|
|
|
|
1997-05-14 15:38:29 -03:00
|
|
|
TFunc *luaI_funccollector (long *cont);
|
|
|
|
void luaI_funcfree (TFunc *l);
|
1997-07-30 19:00:50 -03:00
|
|
|
void luaI_funcmark (TFunc *f);
|
1996-02-07 16:10:27 -02:00
|
|
|
void luaI_initTFunc (TFunc *f);
|
|
|
|
|
|
|
|
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
|