IntelliJ-Luanalysis
IntelliJ-Luanalysis copied to clipboard
Add std defs for LuaJIT
What happens?
There are no def files for LuaJIT.
What were you expecting to happen?
Be able to select a LuaJIT profile
Any comments
Although LuaJIT is mostly compliant with Lua 5.1 there are particular differences as described in the docs here and which Luanalysis marks as errors. In particular there are new modules (bit, jit, ffi), new classes (string.buffer) and new functions (table.new and table.clear). And some global functions have small differences (tostring, tonumber, xpcall, string.dump, math.random, etc) plus some extensions from 5.3 (table.move, coroutine.isyieldable, ...) . There is also the option to enable some extensions from 5.2 (depending on build options) which probably means we might need two profiles one for strict 5.1 (e.g. LuaJIT5.1) and another for 5.1/2 (e.g. LuaJIT5.1+) .