diff options
Diffstat (limited to 'c_compiler/include/type.hpp')
-rw-r--r-- | c_compiler/include/type.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/c_compiler/include/type.hpp b/c_compiler/include/type.hpp index 608b660..80afdfe 100644 --- a/c_compiler/include/type.hpp +++ b/c_compiler/include/type.hpp @@ -1,9 +1,11 @@ #ifndef TYPE_HPP #define TYPE_HPP +#include "bindings.hpp" #include "node.hpp" #include <memory> +#include <string> class Type; @@ -12,8 +14,8 @@ typedef std::shared_ptr<Type> TypePtr; class Type : public Node { public: virtual void print() const; - virtual void printxml() const; - virtual VariableStackBindings printasm(VariableStackBindings bindings) const; + virtual void printXml() const; + virtual VariableStackBindings printAsm(VariableStackBindings bindings) const; virtual std::string getType() const = 0; }; @@ -27,10 +29,10 @@ public: class Pointer : public Type { protected: - TypePtr pointer_type; + TypePtr pointer_type_; public: - Pointer(Type* _pointer_type); + Pointer(Type* pointer_type); virtual std::string getType() const; }; @@ -38,11 +40,11 @@ public: class Array : public Type { protected: - int32_t size; - TypePtr array_type; + TypePtr array_type_; + unsigned size_; public: - Array(Type* _array_type, int32_t _size = 0); + Array(Type* array_type, unsigned size = 0); virtual std::string getType() const; }; |