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