LUA org syntax check
Notepad++ and
Notepad++ LUA syntax check script
--
function sum(n)
return (n*n - n)/2;
end
local s = 0
for i=1,100 do
s = s + i
assert(sum(i) == s, "Case "..i.." failed: expected "..s.." but got "..sum(i).." instead.")
end
--
file = _DesktopFolder.."\\new 1.lua";
local tbl, err = assert(loadfile(file, "t"))
This means that you want to make a project with the element scintilla ?
Listen to me dear friend
if you used Scintilla Object Plugin then just use this code on " Check Syntax button " :
--
nlen = Scintilla.SendMessage("Plugin1", MinTabIndex, "num", SCI_GETLENGTH, "num", 0, "num", 0);
ret , text = Scintilla.SendMessage("Plugin1", MinTabIndex, "num", SCI_GETTEXT, "num", nlen+1, "pstr", nlen);
loadstring (text)();
nlen = Scintilla.SendMessage("Plugin1", MinTabIndex, "num", SCI_GETLENGTH, "num", 0, "num", 0);
ret , text = Scintilla.SendMessage("Plugin1", MinTabIndex, "num", SCI_GETTEXT, "num", nlen+1, "pstr", nlen);
require("LuaLint")
err = lualint(text)
if (err~=nil) then
Dialog.Message('lua error', err)
end