mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
Fix LuaJIT bit operators
This commit is contained in:
parent
836ba82fef
commit
4517ee110f
3 changed files with 3074 additions and 3076 deletions
|
|
@ -425,8 +425,6 @@ This command will use the precompilled version of this repository (candran.lua)
|
|||
canc candran.can
|
||||
````
|
||||
|
||||
The Candran build included in this repository was made using the ```mapLines=false``` option.
|
||||
|
||||
You can then run the tests on your build :
|
||||
|
||||
````
|
||||
|
|
|
|||
6136
candran.lua
6136
candran.lua
File diff suppressed because it is too large
Load diff
|
|
@ -10,27 +10,27 @@ tags._opid.idiv = (left, right)
|
|||
end
|
||||
tags._opid.band = (left, right)
|
||||
addRequire("bit", "band", "band")
|
||||
return getRequire("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
return var("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
end
|
||||
tags._opid.bor = (left, right)
|
||||
addRequire("bit", "bor", "bor")
|
||||
return getRequire("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
return var("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
end
|
||||
tags._opid.bxor = (left, right)
|
||||
addRequire("bit", "bxor", "bxor")
|
||||
return getRequire("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
return var("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
end
|
||||
tags._opid.shl = (left, right)
|
||||
addRequire("bit", "lshift", "lshift")
|
||||
return getRequire("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
return var("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
end
|
||||
tags._opid.shr = (left, right)
|
||||
addRequire("bit", "rshift", "rshift")
|
||||
return getRequire("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
return var("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||
end
|
||||
tags._opid.bnot = (right)
|
||||
addRequire("bit", "bnot", "bnot")
|
||||
return getRequire("bnot") .. "(" .. lua(right) .. ")"
|
||||
return var("bnot") .. "(" .. lua(right) .. ")"
|
||||
end
|
||||
|
||||
#local patch = output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue