From b9dec5a520f1b2f5d782993efe75b7227744631c Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 27 Aug 2022 19:31:09 -0700 Subject: Enable nil constants. --- lib/csc/codegen.csc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/csc') 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) -- cgit v1.3.1