Implement module section types "Signals" (#18) #23

Merged
Aire-One merged 5 commits from feat/#18 into master 2022-10-23 21:39:59 +02:00
1 changed files with 3 additions and 6 deletions
Showing only changes of commit b1c3d80604 - Show all commits

View File

@ -1,17 +1,14 @@
local Function_Info = require "entity.Function_Info"
local List = require "pl.List"
local utils = require "utils"
local stringx = require "pl.stringx"
local template = require "pl.template"
local utils = require "utils"
local snippets = {}
function snippets.indent(str: string, level: number): string
level = level or 1
local ret = ""
for line in str:gmatch("[^\n]+") do
ret = ret .. string.rep(" ", level * 3) .. line .. "\n"
end
return ret
return stringx.rstrip(stringx.indent(str, level, string.rep(" ", 3)))
end
function snippets.render_typed_variable(name: string, types: List<string>): string