Imported from ../lua-2.2.tar.gz.
[lua.git] / src / tree.h
blob48ecb02cf4dd9733dce3189dd5c9f3b2d6d05015
1 /*
2 ** tree.h
3 ** TecCGraf - PUC-Rio
4 ** $Id: tree.h,v 1.10 1995/10/17 11:53:53 roberto Exp $
5 */
7 #ifndef tree_h
8 #define tree_h
10 #include "types.h"
12 #define NOT_USED 0xFFFE
15 typedef struct TaggedString
17 unsigned long hash; /* 0 if not initialized */
18 char marked; /* for garbage collection */
19 char str[1]; /* \0 byte already reserved */
20 } TaggedString;
22 typedef struct TreeNode
24 struct TreeNode *right;
25 struct TreeNode *left;
26 unsigned short varindex; /* != NOT_USED if this is a symbol */
27 unsigned short constindex; /* != NOT_USED if this is a constant */
28 TaggedString ts;
29 } TreeNode;
32 TaggedString *lua_createstring (char *str);
33 TreeNode *lua_constcreate (char *str);
34 Long lua_strcollector (void);
35 TreeNode *luaI_nodebysymbol (Word symbol);
37 #endif