diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-24 22:46:06 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-24 22:46:06 +0000 |
commit | b8738b8d582cba01aa1e944426b0251c9c42ff37 (patch) | |
tree | 7cebba0d549624fe40ca737178231fb52bd980fb /c_compiler/include/bindings.hpp | |
parent | 42156b87d0bc78eb8bac2c0e1cb41f105bbfc32b (diff) | |
download | Compiler-b8738b8d582cba01aa1e944426b0251c9c42ff37.tar.gz Compiler-b8738b8d582cba01aa1e944426b0251c9c42ff37.zip |
Able to store arrays
Diffstat (limited to 'c_compiler/include/bindings.hpp')
-rw-r--r-- | c_compiler/include/bindings.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/c_compiler/include/bindings.hpp b/c_compiler/include/bindings.hpp index 2559420..9383d5d 100644 --- a/c_compiler/include/bindings.hpp +++ b/c_compiler/include/bindings.hpp @@ -31,12 +31,15 @@ private: public: VariableStackBindings(); - void insertBinding(std::string id, TypePtr type, int stack_position); + void insertBinding(const std::string &id, TypePtr type, const int &stack_position); void increaseStackPosition(); - void setStackPosition(int stack_counter); + void increaseStackPosition(const int &position); + void setStackPosition(const int &stack_counter); void nextExpressionStackPosition(); void setExpressionStackPosition(const int &stack_counter); + TypePtr getType(const std::string &id) const; + std::string breakLabel(); std::string breakLabel(const std::string &label); std::string continueLabel(); |