bitwise expressions compiler

This commit is contained in:
Onran
2025-04-06 22:16:04 +09:00
committed by GitHub
parent d9d4d2b305
commit cba48e3a0c
5 changed files with 484 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
local util = { }
util.stack = { }
function util.throw(column, msg)
error("column "..column..": "..msg)
end
function util.stack.push(stack, value)
table.insert(stack, value)
end
function util.stack.pop(stack)
return table.remove(stack, #stack)
end
function util.stack.top(stack)
return stack[#stack]
end
return util