Lua: huge API breaking change: converted all snake_case APIs to camelCase

This commit is contained in:
Zef Hemel
2025-02-06 10:04:45 +01:00
parent 0635faabfc
commit a169406d37
42 changed files with 377 additions and 599 deletions
+5 -12
View File
@@ -1,15 +1,8 @@
local function assert_equal(a, b)
if a ~= b then
error("Assertion failed: " .. a .. " is not equal to " .. b)
end
end
-- Test space_lua stuff
local parsedExpr = space_lua.parse_expression("1 + 1")
local evalResult = space_lua.eval_expression(parsedExpr)
local parsedExpr = spacelua.parseExpression("1 + 1")
local evalResult = spacelua.evalExpression(parsedExpr)
assert(evalResult == 2, "Eval should return 2")
-- Slightly more advanced example with augmented environment
local parsedExpr = space_lua.parse_expression("tostring(a + 1)")
local evalResult = space_lua.eval_expression(parsedExpr, { a = 1 })
assert(evalResult == "2", "Eval should return 2 as a string")
local parsedExpr = spacelua.parseExpression("tostring(a + 1)")
local evalResult = spacelua.evalExpression(parsedExpr, { a = 1 })
assert(evalResult == "2", "Eval should return 2 as a string")