gmsv_darklua is binary module that allows to use darklua inside of Garry's Mod through developer-friendly API of managing rules and generators
most of the stuff you can do with darklua.new function in first argument, can be looked up on the official documentation of darklua with all rules listed and examples shown
require('darklua')
--[[ example of creating darklua "resolver" ]]
local dl = darklua.new({
generator = 'retain_lines',
rules = { 'remove_comments', }
})
print(dl:run([[
-- this is a comment
print('hello world')
/*
and this is a comment too
*/
]]))
--[[
code above will print:
<blank line>
print('hello world')
<blank line>
<blank line>
<blank line>
]]