summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKCons.m16
1 files changed, 12 insertions, 4 deletions
diff --git a/MLKCons.m b/MLKCons.m
index 5bc761a..8b3084b 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -113,10 +113,18 @@
-(NSString *)descriptionForLisp
{
- if ([_cdr isKindOfClass:[MLKCons class]]
- && _car == [[MLKPackage findPackage:@"COMMON-LISP"] intern:@"QUOTE"])
- return [NSString stringWithFormat:@"'%@", [_cdr bareDescriptionForLisp]];
- else
+ if ([_cdr isKindOfClass:[MLKCons class]])
+ {
+ if (_car == [[MLKPackage findPackage:@"COMMON-LISP"] intern:@"QUOTE"])
+ return [NSString stringWithFormat:@"'%@", [_cdr bareDescriptionForLisp]];
+ else if (_car == [[MLKPackage findPackage:@"TOILET-SYSTEM"] intern:@"QUASIQUOTE"])
+ return [NSString stringWithFormat:@"`%@", [_cdr bareDescriptionForLisp]];
+ else if (_car == [[MLKPackage findPackage:@"TOILET-SYSTEM"] intern:@"UNQUOTE"])
+ return [NSString stringWithFormat:@",%@", [_cdr bareDescriptionForLisp]];
+ else if (_car == [[MLKPackage findPackage:@"TOILET-SYSTEM"] intern:@"UNQUOTE-SPLICING"])
+ return [NSString stringWithFormat:@",@%@", [_cdr bareDescriptionForLisp]];
+ }
+
return [NSString stringWithFormat:@"(%@)", [self bareDescriptionForLisp]];
}