Fix T and F builtins to be values, not functions

* T and F were builtins that were created as functions. They have been
  changed to just be global values instead, so you don't need to suffix
  them with ! to get the creamy value inside.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-02-11 11:38:43 -08:00
parent 1f642b9739
commit abd7f7960a
2 changed files with 13 additions and 16 deletions

View File

@@ -1,7 +1,10 @@
0 [ "fail - 0 is not truthy" println! ] [ "OK" println! ] if!
1 [ "OK" println! ] [ "fail - 1 is truthy" println! ] if!
1.1 [ "OK" println! ] [ "fail - 1.1 is truthy" println! ] if!
0.1 [ "OK" println! ] [ "fail - 0.1 is truthy" println! ] if!
-0.1 [ "OK" println! ] [ "fail - -0.1 is truthy" println! ] if!
-0.0 [ "fail - -0.0 is not truthy" println! ] [ "OK" println! ] if!
0.0 [ "fail - 0.0 is not truthy" println! ] [ "OK" println! ] if!
0 [ "fail - 0 is not truthy" ] [ "OK" ] if! println!
1 [ "OK" ] [ "fail - 1 is truthy" ] if! println!
1.1 [ "OK" ] [ "fail - 1.1 is truthy" ] if! println!
0.1 [ "OK" ] [ "fail - 0.1 is truthy" ] if! println!
-0.1 [ "OK" ] [ "fail - -0.1 is truthy" ] if! println!
-0.0 [ "fail - -0.0 is not truthy" ] [ "OK" ] if! println!
0.0 [ "fail - 0.0 is not truthy" ] [ "OK" ] if! println!
T [ "OK" ] [ "fail - T should push True to the stack" ] if! println!
F [ "fail - F should push False to the stack" ] [ "OK" ] if! println!