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 6 additions and 0 deletions
Showing only changes of commit 284b49898c - Show all commits

View File

@ -53,11 +53,17 @@ end
function Module_Dependencies.visit(node: Node, mod: Node, d: Dag)
local all_types <const> = get_all_types_in_node(node)
for _, type_name in ipairs(all_types) do
if type_name == mod.name then
goto continue
end
local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)]
if dependency then
mod.dependencies[dependency.name] = dependency.module_path
replace_in_node_type(node, dependency.module_path, dependency.name)
end
::continue::
end
end