summaryrefslogtreecommitdiff
path: root/src/hir/hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-28 21:25:05 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-28 21:25:05 +0800
commit4ab41041599feb41c38d5db46ce87e69e43374f3 (patch)
tree09280d1a309934b4001782ecae14e4a6e57c1e05 /src/hir/hir.cpp
parenta008403477341808ace1dda16051a373059658dd (diff)
downloadmrust-4ab41041599feb41c38d5db46ce87e69e43374f3.tar.gz
HIR - Support Variant literals
Diffstat (limited to 'src/hir/hir.cpp')
-rw-r--r--src/hir/hir.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp
index c2ad4d00..aa3344eb 100644
--- a/src/hir/hir.cpp
+++ b/src/hir/hir.cpp
@@ -15,6 +15,12 @@ namespace HIR {
os << " " << val << ",";
os << " ]";
),
+ (Variant,
+ os << "#" << e.idx << ":[";
+ for(const auto& val : e.vals)
+ os << " " << val << ",";
+ os << " ]";
+ ),
(Integer,
os << e;
),