Change lua test files to call `require 'lldebugger'` only when using love, because it's not needed with lua or luajit. Also add `stopOnEntry` key to test `.vimspector.json` because it works correctly with this change.
21 lines
341 B
Lua
21 lines
341 B
Lua
local separator = ' '
|
|
|
|
|
|
local function createMessage()
|
|
local words = {}
|
|
table.insert(words, 'Hello')
|
|
table.insert(words, 'world')
|
|
return table.concat(words, separator)
|
|
end
|
|
|
|
|
|
local function withEmphasis(func)
|
|
return function()
|
|
return func() .. '!'
|
|
end
|
|
end
|
|
|
|
|
|
createMessage = withEmphasis(createMessage)
|
|
|
|
print(createMessage())
|