diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-08-27 19:31:09 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-08-27 19:31:09 -0700 |
| commit | b9dec5a520f1b2f5d782993efe75b7227744631c (patch) | |
| tree | 71b4e0759ff962ced24efbd62dc657d1f2b00b5e /lib/csc/codegen.csc | |
| parent | 289fc5ef52ade0f98cc6aa5e85d0edd9e64094de (diff) | |
| download | chromatopelma-b9dec5a520f1b2f5d782993efe75b7227744631c.tar.zst | |
Enable nil constants.
Diffstat (limited to 'lib/csc/codegen.csc')
| -rw-r--r-- | lib/csc/codegen.csc | 5 |
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) |
