From 08899074cf21051e6470bdeb147a41d641c7b26d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 9 Feb 2023 01:12:24 -0600 Subject: [PATCH] [nostalgia/studio] Add Module types to Project TypeStore --- src/nostalgia/studio/lib/project.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/studio/lib/project.cpp b/src/nostalgia/studio/lib/project.cpp index 46ebf6ea..6873f88c 100644 --- a/src/nostalgia/studio/lib/project.cpp +++ b/src/nostalgia/studio/lib/project.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. + * Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved. */ #include @@ -7,12 +7,23 @@ #include +#include + #include "project.hpp" namespace nostalgia::studio { +static void generateTypes(ox::TypeStore *ts) noexcept { + for (const auto mod : *foundation::modules()) { + for (auto gen : mod->types()) { + oxLogError(gen(ts)); + } + } +} + Project::Project(ox::FileSystem *fs, ox::String path) noexcept: m_path(std::move(path)), m_typeStore(fs), m_fs(fs) { oxTracef("nostalgia::studio", "Project: {}", m_path); + generateTypes(&m_typeStore); buildFileIndex(); }