diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-22 14:42:47 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-22 14:42:47 +0200 |
commit | 1641912f2c9967b494187e7522d31bb00c53063c (patch) | |
tree | cce29bb068ad0fababda364c210c3a99be7ebdaa /MLKLexicalEnvironment.h | |
parent | 9960b8e94943867cc321a5145c327188e14d4d44 (diff) |
Add classes MLKLexicalEnvironment and MLKReadEvalPrintLoop.
Diffstat (limited to 'MLKLexicalEnvironment.h')
-rw-r--r-- | MLKLexicalEnvironment.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/MLKLexicalEnvironment.h b/MLKLexicalEnvironment.h new file mode 100644 index 0000000..8d1300d --- /dev/null +++ b/MLKLexicalEnvironment.h @@ -0,0 +1,54 @@ +/* -*- mode: objc; coding: utf-8 -*- */ +/* Étoilisp/Mulklisp, a Common Lisp subset for the Étoilé runtime. + * Copyright (C) 2008 Matthias Andreas Benkard. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <Foundation/NSObject.h> + +@class MLKEnvironment, MLKSymbol, NSLinkedList, + NSMutableDictionary, NSString; + + +@interface MLKLexicalEnvironment : NSObject +{ + MLKEnvironment *_variables; + MLKEnvironment *_functions; + MLKLexicalEnvironment *_parent; +} + +-(MLKLexicalEnvironment *) initWithParent:(MLKLexicalEnvironment *)aContext + variables:(NSDictionary *)vars + functions:(NSDictionary *)handlers; + ++(MLKLexicalEnvironment *) globalEnvironment; + +-(id) valueForSymbol:(MLKSymbol *)symbol; +-(void) setValue:(id)value forSymbol:(MLKSymbol *)symbol; +-(void) addValue:(id)value forSymbol:(MLKSymbol *)symbol; +-(void) addBinding:(MLKSymbol *)symbol; + +-(id) functionForSymbol:(MLKSymbol *)symbol; +-(void) setFunction:(id)value forSymbol:(MLKSymbol *)symbol; +-(void) addFunction:(id)value forSymbol:(MLKSymbol *)symbol; + +-(BOOL) boundp:(MLKSymbol *)symbol; +-(void) makunbound:(MLKSymbol *)symbol; + +-(BOOL) fboundp:(MLKSymbol *)symbol; +-(void) fmakunbound:(MLKSymbol *)symbol; + +-(void) dealloc; +@end |