X-Git-Url: https://gitweb.ps.run/toc/blobdiff_plain/b9322dfb8efe37f6f88a899269bdf21015f4db9a..17860defa84c6d8bc0e8bc088a7e09361f17db07:/src/repr.h?ds=sidebyside diff --git a/src/repr.h b/src/repr.h index b30aecd..709528d 100644 --- a/src/repr.h +++ b/src/repr.h @@ -39,8 +39,11 @@ struct Stmt; struct Context { + std::optional name; std::shared_ptr parent; std::vector variables; + std::vector functions; + std::vector structs; }; enum class TypeModifierType @@ -79,11 +82,13 @@ struct Body struct Function { std::string name; - std::vector genericTypeNames; - std::vector> genericInstantiations; Type returnType; std::vector parameters; bool defined; + + std::vector genericTypeNames; + std::vector> genericInstantiations; + Body body; }; @@ -108,16 +113,12 @@ struct Namespace { std::string name; std::shared_ptr ctx; - std::vector structs; - std::vector functions; std::vector namespaces; }; struct Program { std::shared_ptr ctx; - std::vector structs; - std::vector functions; std::vector namespaces; };