From 896b92c3564a572da103fb50f5bc3fa347983196 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 7 Jan 2012 19:03:16 +1000 Subject: Evaluate expressions using the new token table. --- LuaSL/src/LuaSL_LSL_tree.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'LuaSL/src/LuaSL_LSL_tree.h') diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h index 1c6710d..0d49737 100644 --- a/LuaSL/src/LuaSL_LSL_tree.h +++ b/LuaSL/src/LuaSL_LSL_tree.h @@ -182,9 +182,15 @@ typedef union LSL_Leaf LSL_Script *scriptValue; } LSL_Leaf; +typedef struct +{ + LSL_Type type; + LSL_Leaf content; +} LSL_Value; + typedef void (*convertToken2Lua) (LSL_Leaf *content); typedef void (*outputToken) (LSL_Leaf *content); -typedef LSL_Leaf *(*evaluateToken) (LSL_Leaf *content, LSL_Type oldType, LSL_Leaf *old); +typedef void (*evaluateToken) (LSL_Leaf *content, LSL_Value *result); typedef struct { @@ -208,7 +214,6 @@ typedef struct LSL_Expression struct LSL_Expression *left; struct LSL_Expression *right; LSL_Token *token; - LSL_Type type; LSL_Leaf content; } LSL_Expression; @@ -219,7 +224,6 @@ typedef struct LSL_AST int line; int character; LSL_Token *token; - LSL_Type type; LSL_Leaf content; } LSL_AST; -- cgit v1.1