diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-31 13:11:44 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-31 13:11:44 +0800 |
| commit | 4a5bc55769804d003d6cd9f8c16eefb76bb53d1b (patch) | |
| tree | 365756351275152391a812440f6a76b9f92cc854 /Type.hh | |
| parent | bd44c9eaef1f4dcbbd98d4489885566b6c7e5138 (diff) | |
full support of array, pointer and record stuffs
Diffstat (limited to 'Type.hh')
| -rw-r--r-- | Type.hh | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -197,6 +197,17 @@ class FunctionType : public Type { std::shared_ptr<Type> ReturnType_; std::vector<std::shared_ptr<Type>> ArgTypes_; }; + +using RecordMember = std::pair<std::string, std::shared_ptr<Type>>; + +class RecordType : public Type { + public: + RecordType(const std::vector<RecordMember>& members, std::string&& name); + std::pair<int, std::shared_ptr<Type>> GetMember(const std::string& name); + + protected: + std::map<std::string, std::pair<int, std::shared_ptr<Type>>> members_; +}; } // namespace pcc #endif // PCC_TYPE_H |
