diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-12 23:40:36 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-12 23:40:36 +0800 |
commit | 53ebabd01b6cc8aca39c48cb616c17fa23a0782d (patch) | |
tree | 5e2c03f349344c32ac314b6a73cf1c52247f6d70 /src/hir/visitor.cpp | |
parent | b337562448d2dccd2a634b8dba50aeab76376f4b (diff) | |
download | mrust-53ebabd01b6cc8aca39c48cb616c17fa23a0782d.tar.gz |
HIR Patterns - Support binding Value::Named to targets
Diffstat (limited to 'src/hir/visitor.cpp')
-rw-r--r-- | src/hir/visitor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hir/visitor.cpp b/src/hir/visitor.cpp index 9767996e..daef834d 100644 --- a/src/hir/visitor.cpp +++ b/src/hir/visitor.cpp @@ -330,6 +330,9 @@ void ::HIR::Visitor::visit_pattern(::HIR::Pattern& pat) for(auto& sp : e.sub_patterns) this->visit_pattern(sp); ), + (StructValue, + this->visit_generic_path(e.path, ::HIR::Visitor::PathContext::TYPE); + ), (StructTupleWildcard, this->visit_generic_path(e.path, ::HIR::Visitor::PathContext::TYPE); ), @@ -387,7 +390,7 @@ void ::HIR::Visitor::visit_pattern_val(::HIR::Pattern::Value& val) (String, ), (Named, - this->visit_path(e, ::HIR::Visitor::PathContext::VALUE); + this->visit_path(e.path, ::HIR::Visitor::PathContext::VALUE); ) ) } |