X-Git-Url: https://gitweb.ps.run/toc/blobdiff_plain/be56e29997e17685eebf8bd7cb745183c60de7db..7f83e1b208e87e3808b268303bb633a8fda203f5:/src/repr.h diff --git a/src/repr.h b/src/repr.h index f196427..fc77d92 100644 --- a/src/repr.h +++ b/src/repr.h @@ -37,6 +37,12 @@ struct AssignStmt; struct ReturnStmt; struct Stmt; +struct Context +{ + std::shared_ptr parent; + std::vector variables; +}; + enum class TypeModifierType { Pointer, Array @@ -65,7 +71,7 @@ struct Variable struct Body { - std::vector variables; + std::shared_ptr ctx; std::vector statements; }; @@ -95,7 +101,7 @@ struct Struct struct Namespace { std::string name; - std::vector variables; + std::shared_ptr ctx; std::vector structs; std::vector functions; std::vector namespaces; @@ -103,7 +109,7 @@ struct Namespace struct Program { - std::vector variables; + std::shared_ptr ctx; std::vector structs; std::vector functions; std::vector namespaces;