summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-25 11:41:59 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-25 11:41:59 +0800
commite5e35f133492a9a9e1bd5ad20a3cc4f363bd6c84 (patch)
treea7cbbf22cebbbd91ffa0b45325bc8c5e72b4044e
parentd8d68be7ebee43e47ce7be630f502895b3673010 (diff)
downloadmrust-e5e35f133492a9a9e1bd5ad20a3cc4f363bd6c84.tar.gz
MIR - (minor) commenting
-rw-r--r--src/mir/mir.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mir/mir.hpp b/src/mir/mir.hpp
index 1e175ccd..39113acb 100644
--- a/src/mir/mir.hpp
+++ b/src/mir/mir.hpp
@@ -32,6 +32,7 @@ TAGGED_UNION_EX(LValue, (), Variable, (
(Static, ::HIR::Path),
// Function return
(Return, struct{}),
+ // Field access (tuple, struct, tuple struct, enum field, ...)
(Field, struct {
::std::unique_ptr<LValue> val;
unsigned int field_index;
@@ -45,6 +46,7 @@ TAGGED_UNION_EX(LValue, (), Variable, (
::std::unique_ptr<LValue> val;
::std::unique_ptr<LValue> idx;
}),
+ // Interpret an enum as a particular variant
(Downcast, struct {
::std::unique_ptr<LValue> val;
unsigned int variant_index;