Closed bsuth closed 1 year ago
Erde's current behavior for handling Lua keywords that are not keywords in Erde is as follows:
Erde:
local end = 1
Lua:
local __ERDE_SUBSTITUTE_end__ = 1
local t = { end = 1 } print(t.end)
local t = { ["end"] = 1 } print(t["end"])
However, this still has the following limitations:
_G
_MODULE
Erde
global end = 5 print(end) print(_G.end)
Lua
global __ERDE_SUBSTITUTE_end__ = 5 print(__ERDE_SUBSTITUTE_end__) print(_G.end) -- nil
print(a.b:end())
print((function() -- Error may occur in this function, for example if `a` is nil local tmp = a.b return tmp["end"](tmp) end)())
closed by https://github.com/erde-lang/erde/commit/10898e493c109494087b9eacdd4e61bb0775b943
Erde's current behavior for handling Lua keywords that are not keywords in Erde is as follows:
Erde:
Lua:
Erde:
Lua:
However, this still has the following limitations:
_G
/_MODULE
Erde
Lua
Erde
Lua