diff options
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_tree="$Id: tree.c,v 1.13 1995/01/12 14:19:04 roberto Exp roberto $"; | 6 | char *rcs_tree="$Id: tree.c,v 1.14 1995/10/17 11:53:53 roberto Exp roberto $"; |
7 | 7 | ||
8 | 8 | ||
9 | #include <string.h> | 9 | #include <string.h> |
@@ -103,21 +103,3 @@ Long lua_strcollector (void) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | 105 | ||
106 | /* | ||
107 | ** Traverse the constant tree looking for a specific symbol number | ||
108 | */ | ||
109 | static TreeNode *nodebysymbol (TreeNode *root, Word symbol) | ||
110 | { | ||
111 | TreeNode *t; | ||
112 | if (root == NULL) return NULL; | ||
113 | if (root->varindex == symbol) return root; | ||
114 | t = nodebysymbol(root->left, symbol); | ||
115 | if (t) return t; | ||
116 | return nodebysymbol(root->right, symbol); | ||
117 | } | ||
118 | |||
119 | TreeNode *luaI_nodebysymbol (Word symbol) | ||
120 | { | ||
121 | return nodebysymbol(constant_root, symbol); | ||
122 | } | ||
123 | |||