diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-15 18:39:01 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-15 18:39:01 +0100 |
commit | a3b4cd4fdd4340c952eaa00bca9bebf817b901ae (patch) | |
tree | 055d3ae4b9d1e37682c2e49b31a6531f189eebf5 /flowgraph/scope.h | |
parent | d07c5bc14edbe071ee7b4f47f174780e95e451aa (diff) |
Fixed unit tests, prepared hierarchical evaluation via stack (WIP)
Diffstat (limited to 'flowgraph/scope.h')
-rw-r--r-- | flowgraph/scope.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/flowgraph/scope.h b/flowgraph/scope.h new file mode 100644 index 0000000..50003f4 --- /dev/null +++ b/flowgraph/scope.h @@ -0,0 +1,29 @@ +#pragma once + +#include "data.h" + +#include "minicc.h" + +#include <cstddef> +#include <memory> +#include <vector> + +namespace FlowGraph { + + class TemporaryStorage; ///< Forward declaration + + // Provide a context for local temporaries name generation + class LocalScope + { + public: + LocalScope() = default; + + void push_back(std::shared_ptr<Data> data); + void append(const LocalScope& other); + index_t indexOfStorage(const TemporaryStorage& storage) const; + + private: + std::vector<std::shared_ptr<Data>> m_variables; + }; + +} |