summaryrefslogtreecommitdiff
path: root/MLKLexicalContext.h
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-22 19:08:48 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-22 19:08:48 +0200
commitc1c67282c0aa86a7ef5f24c6befba5ea3ff38293 (patch)
treeee82c3ae3cddd97b166e3b6dd14b0ce3c35c01ad /MLKLexicalContext.h
parent4d6aeae2792ee17d125faf7d958823ce4c05a4e2 (diff)
Add class MLKLexicalContext.
Diffstat (limited to 'MLKLexicalContext.h')
-rw-r--r--MLKLexicalContext.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/MLKLexicalContext.h b/MLKLexicalContext.h
index 68acb80..f869d8d 100644
--- a/MLKLexicalContext.h
+++ b/MLKLexicalContext.h
@@ -18,38 +18,48 @@
#import "MLKLispValue.h"
-@class MLKEnvironment, MLKSymbol, NSLinkedList, NSSet,
- NSMutableDictionary, NSString, MLKCons;
+@class MLKEnvironment, MLKLexicalEnvironment, MLKSymbol, NSLinkedList, NSSet,
+ NSMutableDictionary, NSString, MLKCons, MLKFuncallable;
@interface MLKLexicalContext : MLKLispValue
{
- MLKEnvironment *_macroBindings;
+ NSArray *_knownMacros;
+ MLKEnvironment *_macros;
+ MLKEnvironment *_symbolMacros;
MLKEnvironment *_goTags;
+ NSMutableDictionary *_functionLocations;
NSMutableDictionary *_variableLocations;
- MLKCons *_declarations;
+ id _declarations;
MLKLexicalContext *_parent;
}
-(MLKLexicalContext *) initWithParent:(MLKLexicalContext *)aContext
variables:(NSSet *)vars
+ functions:(NSSet *)functions
goTags:(NSDictionary *)goTags
macros:(NSDictionary *)macros
declarations:(NSDictionary *)declarations;
+(MLKLexicalContext *) globalContext;
-+(MLKLexicalContext *) nullContext;
-
--(MLKEnvironment *) environment;
-(BOOL) symbolNamesFunction:(MLKSymbol *)symbol;
-(BOOL) symbolNamesMacro:(MLKSymbol *)symbol;
-(id) macroForSymbol:(MLKSymbol *)symbol;
+-(void) setMacro:(MLKFuncallable *)function forSymbol:(MLKSymbol *)symbol;
+
+-(id) symbolMacroForSymbol:(MLKSymbol *)symbol;
+-(void) setSymbolMacro:(MLKFuncallable *)function forSymbol:(MLKSymbol *)symbol;
+
-(id) goTagForSymbol:(MLKSymbol *)symbol;
-(id) variableLocationForSymbol:(MLKSymbol *)symbol;
+-(MLKLexicalEnvironment *) instantiateWithVariables:(NSDictionary *)variables
+ functions:(NSDictionary *)functions;
+
-(void) addVariable:(MLKSymbol *)symbol;
+-(void) addFunction:(MLKSymbol *)symbol;
-(BOOL) variableIsLexical:(MLKSymbol *)symbol;