From a6955cf42df675518514e4da54f36174de9eb736 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 12 Jun 2008 19:44:53 +0200 Subject: Simplify MLKEnvironment. --- MLKEnvironment.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'MLKEnvironment.h') diff --git a/MLKEnvironment.h b/MLKEnvironment.h index fe2be16..b40ea5a 100644 --- a/MLKEnvironment.h +++ b/MLKEnvironment.h @@ -3,12 +3,13 @@ #import "MLKLispValue.h" -@class NSMutableDictionary, MLKLinkedList, MLKSymbol; +@class NSMutableDictionary, MLKSymbol; @interface MLKEnvironment : MLKLispValue { - MLKLinkedList *_bindings; + MLKEnvironment *_parent; + NSMutableDictionary *_bindings; } -(MLKEnvironment *) init; @@ -20,4 +21,8 @@ -(void) addBinding:(MLKSymbol *)symbol to:(id)value; -(void) setBinding:(MLKSymbol *)symbol to:(id)value; -(id) valueForBinding:(MLKSymbol *)symbol; + +// Private methods. +-(void) setBinding:(MLKSymbol *)symbol to:(id)value inEnvironment:(MLKEnvironment *)env; +-(id) valueForBinding:(MLKSymbol *)symbol inEnvironment:(MLKEnvironment *)env; @end -- cgit v1.2.3