blob: 72d0ac53839a43c4fd029a59e4bdd13cc1536009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef __LLS_H
#define __LLS_H
typedef int(*lls_Func)();
typedef struct
{
const char* name;
lls_Func func;
} lls_FuncMap;
typedef struct
{
int top;
lls_FuncMap* funcMap;
} lls_Env;
lls_Env* lls_newenv();
int lls_bindfunction(lls_Env* env, const char* fname, lls_Func func);
int lls_bindvariable(lls_Env* env, const char* vname, void* variable);
int lls_bindset();
int lls_executefile(lls_Env* env, const char* file);
int lls_executesource(lls_Env* env, const void* buffer, int size);
#endif
|