diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-19 19:14:06 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-19 19:14:06 +0200 |
commit | 8337945090fe3fd0e142fda4dd98bb3fca23fbf5 (patch) | |
tree | 8cc154ad0d850dece1c4b853633230b405cb9797 | |
parent | af5a200a68ed12efec4b29b57fa22c632aaf91fa (diff) |
Fix symbol reading.
-rw-r--r-- | MLKDynamicContext.h | 2 | ||||
-rw-r--r-- | MLKDynamicContext.m | 5 | ||||
-rw-r--r-- | MLKReader.m | 7 |
3 files changed, 11 insertions, 3 deletions
diff --git a/MLKDynamicContext.h b/MLKDynamicContext.h index 0fbd5d4..b4c304c 100644 --- a/MLKDynamicContext.h +++ b/MLKDynamicContext.h @@ -39,6 +39,8 @@ catchTags:(NSDictionary *)catchTags activeHandlerEnvironment:(MLKEnvironment *)handlerEnv; ++(MLKDynamicContext *) globalContext; + -(MLKDynamicContext *) pushContext; +(MLKDynamicContext *) currentContext; diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m index 6bfd03a..6d135a4 100644 --- a/MLKDynamicContext.m +++ b/MLKDynamicContext.m @@ -264,6 +264,11 @@ static MLKDynamicContext *global_context; return self; } ++(MLKDynamicContext *) globalContext +{ + return global_context; +} + -(MLKDynamicContext *) pushContext { [[[NSThread currentThread] threadDictionary] setObject:self diff --git a/MLKReader.m b/MLKReader.m index 422fd8f..2341d32 100644 --- a/MLKReader.m +++ b/MLKReader.m @@ -107,7 +107,8 @@ if ([readtable isConstituentCharacter:ch]) { token = [NSMutableString stringWithCapacity:8]; - [token appendFormat:@"%C", [stream readChar]]; + [token appendFormat:@"%C", [readtable charWithReadtableCase: + [stream readChar]]]; } while (![stream isEOF]) @@ -407,7 +408,7 @@ break; } } - + // Extract the package and symbol name. if (packageMarker == -1) { @@ -443,7 +444,7 @@ if (packageMarker == 0) { // Make keyword symbols self-evaluate. - [[MLKDynamicContext currentContext] setValue:symbol forBinding:symbol]; + [[MLKDynamicContext globalContext] addValue:symbol forBinding:symbol]; } return symbol; |