summaryrefslogtreecommitdiff
path: root/src/ast/ast.hpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-18 19:28:14 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-18 19:28:14 +0800
commitdef96a573903b5fcb95e8a8dffb94a3a9a7f8501 (patch)
treea45104be0bc74144d5979090950647ad27f855d9 /src/ast/ast.hpp
parentc3ca711c49760e7f9467afd0811a0427c67e0dc1 (diff)
downloadmrust-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.hpp8
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) );