Sort out the and/or/... ops.
This commit is contained in:
parent
c0fa319c9c
commit
540bdd97bd
14
README.md
14
README.md
|
|
@ -267,6 +267,20 @@ dialect of Joy are defined in terms of these:
|
|||
/\ \/ _\/_ (These are the logical ops. Booleans)
|
||||
|
||||
|
||||
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
| | Logical (Boolean) | Bitwise (Ints) | Short-Circuiting Combinators |
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
| AND | /\ | && | and |
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
| OR | \/ | || | or |
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
| XOR | _\/_ | xor | |
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
| NOT | not | ~ | |
|
||||
+-----+-------------------+----------------+------------------------------+
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
|
||||
Copyright © 2014 - 2023 Simon Forman
|
||||
|
|
|
|||
|
|
@ -201,10 +201,10 @@ joy_function_eval symbol stack expression =
|
|||
"=" ->
|
||||
joy_comparison_op (==) stack expression
|
||||
|
||||
"and" ->
|
||||
"&&" ->
|
||||
joy_binary_math_op Bitwise.and stack expression
|
||||
|
||||
"or" ->
|
||||
"||" ->
|
||||
joy_binary_math_op Bitwise.or stack expression
|
||||
|
||||
"xor" ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue