diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-10 17:09:40 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-10 17:09:40 +0200 |
commit | d355e8a5ef359b76ddaec26f33a8c9345d3a2e79 (patch) | |
tree | 0aebe10a7dc200a7b4cdf3304ef3faf93a4e0297 | |
parent | bd264499c08c196aa2ce69702cba0829ab24788a (diff) |
Add class MLKSymbol.
-rw-r--r-- | GNUmakefile | 3 | ||||
-rw-r--r-- | MLKSymbol.h | 20 | ||||
-rw-r--r-- | MLKSymbol.m | 30 |
3 files changed, 52 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 36c159d..68e893b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -19,7 +19,8 @@ include $(GNUSTEP_MAKEFILES)/common.make TOOL_NAME = etoilisp etoilisp_OBJC_FILES = MLKCons.m MLKEnvironment.m MLKLinkedList.m \ - MLKLispValue.m MLKUndefinedVariableException.m + MLKLispValue.m MLKSymbol.m \ + MLKUndefinedVariableException.m -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/tool.make diff --git a/MLKSymbol.h b/MLKSymbol.h new file mode 100644 index 0000000..e239c67 --- /dev/null +++ b/MLKSymbol.h @@ -0,0 +1,20 @@ +/* -*- mode: objc; coding: utf-8 -*- */ +/* Copyright 2008, Matthias Benkard. */ + +#import "MLKLispValue.h" + +@class MLKPackage; + + +@interface MLKSymbol : MLKLispValue +{ + NSString *name; + MLKPackage *homePackage; +} + +-(MLKSymbol *) initWithName:(id)aName package:(id)aPackage; + +-(NSString *) name; +-(MLKPackage *) homePackage; +-(void) setHomePackage:(MLKPackage *)aPackage; +@end diff --git a/MLKSymbol.m b/MLKSymbol.m new file mode 100644 index 0000000..6d19323 --- /dev/null +++ b/MLKSymbol.m @@ -0,0 +1,30 @@ +/* -*- mode: objc; coding: utf-8 -*- */ +/* Copyright 2008, Matthias Benkard. */ + +#import "MLKSymbol.h" + + +@implementation MLKSymbol +-(MLKSymbol *) initWithName:(id)aName package:(id)aPackage +{ + ASSIGN (name, aName); + ASSIGN (homePackage, aPackage); + return self; +} + +-(NSString *) name +{ + return name; +} + +-(MLKPackage *) homePackage +{ + return homePackage; +} + +-(void) setHomePackage:(MLKPackage *)aPackage +{ + ASSIGN (homePackage, aPackage); +} +@end + |