fix(spec): ASTs need to have `dependencies`
This commit is contained in:
parent
bea2f0fc54
commit
8d54ab4746
|
@ -21,6 +21,7 @@ describe("Teal type definition Printer", function()
|
|||
it("should print a simple module type definition", gen(
|
||||
{
|
||||
children = {},
|
||||
dependencies = {},
|
||||
name = "Empty",
|
||||
token = "module",
|
||||
},
|
||||
|
@ -51,6 +52,7 @@ describe("Teal type definition Printer", function()
|
|||
token = "enum",
|
||||
},
|
||||
},
|
||||
dependencies = {},
|
||||
name = "Signal_Module",
|
||||
token = "module",
|
||||
},
|
||||
|
@ -76,6 +78,7 @@ describe("Teal type definition Printer", function()
|
|||
token = "variable",
|
||||
}
|
||||
},
|
||||
dependencies = {},
|
||||
name = "Property_Module",
|
||||
token = "module",
|
||||
},
|
||||
|
@ -110,6 +113,7 @@ describe("Teal type definition Printer", function()
|
|||
token = "function",
|
||||
},
|
||||
},
|
||||
dependencies = {},
|
||||
name = "Function_Module",
|
||||
token = "module",
|
||||
},
|
||||
|
@ -132,6 +136,7 @@ describe("Teal type definition Printer", function()
|
|||
token = "record",
|
||||
}
|
||||
},
|
||||
dependencies = {},
|
||||
name = "Nested_Module",
|
||||
token = "module",
|
||||
},
|
||||
|
|
|
@ -54,10 +54,9 @@ local node_printer <total>: { Node.Token : Node_Printer_Function } = {
|
|||
[[
|
||||
-- This file was auto-generated.
|
||||
%s
|
||||
|
||||
local record %s
|
||||
]],
|
||||
render_require(node.dependencies),
|
||||
render_require(node.dependencies), -- last require statement will have a newline
|
||||
node.name),
|
||||
indent_level), indent_level + 1
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue