diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-18 19:28:14 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-18 19:28:14 +0800 |
commit | def96a573903b5fcb95e8a8dffb94a3a9a7f8501 (patch) | |
tree | a45104be0bc74144d5979090950647ad27f855d9 /src/ast/ast.hpp | |
parent | c3ca711c49760e7f9467afd0811a0427c67e0dc1 (diff) | |
download | mrust-def96a573903b5fcb95e8a8dffb94a3a9a7f8501.tar.gz |
Most types iterating well, special case for Self type
Diffstat (limited to 'src/ast/ast.hpp')
-rw-r--r-- | src/ast/ast.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp index 849587f1..b684379f 100644 --- a/src/ast/ast.hpp +++ b/src/ast/ast.hpp @@ -176,6 +176,9 @@ public: const TypeParams& params() const { return m_params; }
const TypeRef& type() const { return m_type; }
+ TypeParams& params() { return m_params; }
+ TypeRef& type() { return m_type; }
+
SERIALISABLE_PROTOTYPES();
};
@@ -265,7 +268,12 @@ public: }
const TypeParams& params() const { return m_params; }
+ const ItemList<Function>& functions() const { return m_functions; }
const ItemList<TypeRef>& types() const { return m_types; }
+
+ TypeParams& params() { return m_params; }
+ ItemList<Function>& functions() { return m_functions; }
+ ItemList<TypeRef>& types() { return m_types; }
void add_type(::std::string name, TypeRef type) {
m_types.push_back( Item<TypeRef>(move(name), move(type), true) );
|