summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLexicalContext.h3
-rw-r--r--MLKLexicalContext.m12
2 files changed, 15 insertions, 0 deletions
diff --git a/MLKLexicalContext.h b/MLKLexicalContext.h
index 949bcff..c4aafc2 100644
--- a/MLKLexicalContext.h
+++ b/MLKLexicalContext.h
@@ -81,6 +81,9 @@
-(id) goTagForSymbol:(MLKSymbol *)symbol;
+-(id) declarations;
+-(void) addDeclaration:(id)declaration;
+
// FIXME?
//-(MLKLexicalEnvironment *) instantiateWithVariables:(NSDictionary *)variables
// functions:(NSDictionary *)functions;
diff --git a/MLKLexicalContext.m b/MLKLexicalContext.m
index a4c0ba2..cec9fd7 100644
--- a/MLKLexicalContext.m
+++ b/MLKLexicalContext.m
@@ -180,6 +180,18 @@ static MLKSymbol *LEXICAL;
return [_goTags valueForSymbol:symbol];
}
+-(id) declarations
+{
+ return _declarations;
+}
+
+-(void) addDeclaration:(id)declaration
+{
+ ASSIGN (_declarations,
+ [MLKCons cons:declaration
+ with:_declarations]);
+}
+
-(BOOL) symbolNamesFunction:(MLKSymbol *)symbol
{
symbol = symbol ? (id)symbol : (id)[NSNull null];