diff options
author | Lua Team <team@lua.org> | 1995-02-07 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 1995-02-07 12:00:00 +0000 |
commit | a8b6ba0954edb9e0e669e1f451b9a8f145ce5166 (patch) | |
tree | 35e9e9999968c4f13a25a5f647203456f044274a /src/tree.h | |
parent | 944fc7d7d95575f2b8023c1f3d4ac19e1369fc76 (diff) | |
download | lua-github-2.1.tar.gz |
Lua 2.12.1
Diffstat (limited to 'src/tree.h')
-rw-r--r-- | src/tree.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/tree.h b/src/tree.h new file mode 100644 index 00000000..849cd5a9 --- /dev/null +++ b/src/tree.h @@ -0,0 +1,37 @@ +/* +** tree.h +** TecCGraf - PUC-Rio +** $Id: tree.h,v 1.9 1995/01/12 14:19:04 roberto Exp $ +*/ + +#ifndef tree_h +#define tree_h + +#include "types.h" + +#define NOT_USED 0xFFFE + + +typedef struct TaggedString +{ + unsigned long hash; /* 0 if not initialized */ + char marked; /* for garbage collection */ + char str[1]; /* \0 byte already reserved */ +} TaggedString; + +typedef struct TreeNode +{ + struct TreeNode *right; + struct TreeNode *left; + unsigned short varindex; /* != NOT_USED if this is a symbol */ + unsigned short constindex; /* != NOT_USED if this is a constant */ + TaggedString ts; +} TreeNode; + + +TaggedString *lua_createstring (char *str); +TreeNode *lua_constcreate (char *str); +Long lua_strcollector (void); +TreeNode *lua_varnext (char *n); + +#endif |