aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csc/codegen.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-08-27 19:31:09 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-08-27 19:31:09 -0700
commitb9dec5a520f1b2f5d782993efe75b7227744631c (patch)
tree71b4e0759ff962ced24efbd62dc657d1f2b00b5e /lib/csc/codegen.csc
parent289fc5ef52ade0f98cc6aa5e85d0edd9e64094de (diff)
downloadchromatopelma-b9dec5a520f1b2f5d782993efe75b7227744631c.tar.zst
Enable nil constants.
Diffstat (limited to 'lib/csc/codegen.csc')
-rw-r--r--lib/csc/codegen.csc5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/csc/codegen.csc b/lib/csc/codegen.csc
index 688e3c9..abec72f 100644
--- a/lib/csc/codegen.csc
+++ b/lib/csc/codegen.csc
@@ -58,9 +58,10 @@
(> x (- (expt 2 30) 1))) ; out of range for a small int
(error "I don't support big ints yet"))
((or (integer? x)
- (boolean? x))
+ (boolean? x)
+ (null? x))
(list 'const x))
- (else (error "Only small ints and bool constants are supported for now"))))
+ (else (error "Only small ints and bool constants are supported for now" x))))
((% %library-ref x lib)
(list 'global x lib))
((% %variable sym)