From 7f83e1b208e87e3808b268303bb633a8fda203f5 Mon Sep 17 00:00:00 2001 From: Patrick Schönberger Date: Wed, 4 Aug 2021 15:05:42 +0200 Subject: pre change --- src/repr.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to '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; -- cgit v1.2.3