diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-08-29 19:38:14 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-08-29 19:39:15 -0700 |
| commit | 4f30e02acb666c52e0254eb9a3bf89a9cabb5e6d (patch) | |
| tree | bacc6a2baf70c18d3d44db06dc2235ec42edd49f /core/operators.nom | |
| parent | aae5ce31feb482a86d8ef96fb1f104194f26828c (diff) | |
Handling more compatibility stuff, including Lua 5.4, and a backup for
if openssl module is not found, and moving containers (List/Dict) into
their own file, as well as bit operators (and support for __bxor, etc.
metamethods in Lua 5.2/LuaJIT)
Diffstat (limited to 'core/operators.nom')
| -rw-r--r-- | core/operators.nom | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/operators.nom b/core/operators.nom index fbf88bb..863ebc8 100644 --- a/core/operators.nom +++ b/core/operators.nom @@ -238,7 +238,7 @@ compile [%x or %y] to (Lua value "(\(%x as lua expr) or \(%y as lua expr))") # Bitwise Operators # TODO: implement OR, XOR, AND for multiple operands? test: - assume ((~ 5) == -6) + assume ((~ (~ 5)) == 5) assume ((1 | 4) == 5) assume ((1 ~ 3) == 2) assume ((1 & 3) == 1) @@ -285,8 +285,8 @@ compile [- %] to (Lua value "(- \(% as lua expr))") compile [not %] to (Lua value "(not \(% as lua expr))") test: - assume ((length of [1, 2, 3]) == 3) -compile [length of %list, len %list, || %list ||] to (..) + assume ((size of [1, 2, 3]) == 3) +compile [size of %list, length of %list, len %list, || %list ||] to (..) Lua value "(#\(%list as lua expr))" compile [%list is empty] to (Lua value "(#\(%list as lua expr) == 0)") |
