Move to an AST like data structure #76

Merged
Aire-One merged 39 commits from feat/refactor-ast into master 2023-08-03 21:03:16 +02:00
1 changed files with 34 additions and 0 deletions
Showing only changes of commit 8737c9dd28 - Show all commits

View File

@ -88,4 +88,38 @@ describe("Teal type definition Printer", function()
return Property_Module
]]))
it("should print a function exposed by the module", gen(
{
children = {
{
parameters = {
{
types = { "integer" },
name = "pid",
token = "variable",
},
{
types = { "integer" },
name = "sig",
token = "variable",
},
},
return_types = { "boolean" },
name = "kill",
token = "function",
},
},
name = "Function_Module",
token = "module",
},
[[
-- This file was auto-generated.
local record Function_Module
kill: function(pid: integer, sig: integer): boolean
end
return Function_Module
]]))
end)