aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/bindings.hpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-28 11:16:55 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-03-28 11:16:55 +0100
commitc15bba765558e1017ef68f6d319141d4fb0b71fd (patch)
treefc432c5fdc9068439e2601c68c6e73f1f6ae4473 /c_compiler/include/bindings.hpp
parent28f3bd2ff6984d653709716e092a322d4de4e3ea (diff)
downloadCompiler-c15bba765558e1017ef68f6d319141d4fb0b71fd.tar.gz
Compiler-c15bba765558e1017ef68f6d319141d4fb0b71fd.zip
can insert mult dim arrays
Diffstat (limited to 'c_compiler/include/bindings.hpp')
-rw-r--r--c_compiler/include/bindings.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/c_compiler/include/bindings.hpp b/c_compiler/include/bindings.hpp
index d99d97b..42d52e1 100644
--- a/c_compiler/include/bindings.hpp
+++ b/c_compiler/include/bindings.hpp
@@ -15,6 +15,7 @@ struct DeclarationData
{
TypePtr type;
int stack_position;
+ std::vector<int> array_sizes;
};
// stores bindings for the current scope and where they are in the stack
@@ -31,7 +32,8 @@ private:
public:
Bindings();
- void insertBinding(const std::string &id, TypePtr type, const int &stack_position);
+ void insertBinding(const std::string &id, const TypePtr &type, const int &stack_position);
+ void insertBinding(const std::string &id, const TypePtr &type, const int &stack_position, const std::vector<int> array_sizes);
int insertStringLiteral(const std::string &string_literal);
void increaseStackPosition();
void increaseStackPosition(const int &position);