LunaLua style guide
Jump to navigation
Jump to search
Whitespace
do
-- Indent with tabs.
local myVar = 1 -- Optionally align. If aligning, use spaces.
local otherVar = 2
local someTbl = {
"tables split across",
"multiple lines should",
"look like this"
}
end
Comments
--------------------
-- SECTION HEADER --
--------------------
-- Prose comments, either on their own line or after code, have a space after the double-dash.
--- LDoc-compatible function description.
-- Optional additional description lines.
-- @param foo first parameter
-- @param bar second parameter
function doAThing(foo, bar)
return foo + bar
end