commit 37f35309d47ff89682e9e8a586304beb7e5290b2
parent 628a425f3697d6def8e9d0c963f12ca3986d199a
Author: phoebos <ben@bvnf.space>
Date: Mon, 17 Jul 2023 12:57:23 +0100
tsort: add comments
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/bliss/tsort.lua b/bliss/tsort.lua
@@ -30,6 +30,8 @@ function tsort.new()
return setmetatable({nodes={}}, {__index = tsort})
end
+-- deps is an array of ALL the deps for node. Calling add for the same node a
+-- second time overwrites, not appends.
function tsort:add(node, deps)
self.nodes[node] = deps
end