diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-20 22:24:46 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-20 22:24:46 +0800 |
commit | 15284f127f4c622bf4d67d8d8c44e1799f84e7cb (patch) | |
tree | 4b85f478b9f840eeba2bfada5d53d8c7d70b6aef /src/convert/ast_iterate.cpp | |
parent | 2306ea6076531132e990d038bdf759b71d9654db (diff) | |
download | mrust-15284f127f4c622bf4d67d8d8c44e1799f84e7cb.tar.gz |
Type resolution coming along, need to add 'self' to the local variable table
Diffstat (limited to 'src/convert/ast_iterate.cpp')
-rw-r--r-- | src/convert/ast_iterate.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/convert/ast_iterate.cpp b/src/convert/ast_iterate.cpp index 5d8961f9..4ed63b56 100644 --- a/src/convert/ast_iterate.cpp +++ b/src/convert/ast_iterate.cpp @@ -27,7 +27,7 @@ void CASTIterator::handle_params(AST::TypeParams& params) for( auto& param : params.params() ) { if( param.is_type() ) - local_type(param.name()); + local_type( param.name(), TypeRef(TypeRef::TagArg(), param.name()) ); } for( auto& bound : params.bounds() ) { @@ -40,9 +40,9 @@ void CASTIterator::start_scope() { INDENT(); } -void CASTIterator::local_type(::std::string name) +void CASTIterator::local_type(::std::string name, TypeRef type) { - DEBUG("type " << name); + DEBUG("type " << name << " = " << type); } void CASTIterator::local_variable(bool is_mut, ::std::string name, const TypeRef& type) { @@ -171,6 +171,8 @@ void CASTIterator::handle_impl(AST::Path modpath, AST::Impl& impl) // Type handle_type( impl.type() ); + local_type("Self", impl.type()); + // TODO: Associated types // Functions |