summaryrefslogtreecommitdiff
path: root/src/ast/expr.cpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-21 20:30:20 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-21 20:30:20 +0800
commit8d1acfa3993e64b0266365379602799350855f3f (patch)
tree8ebd1c2c02a322714d2ea64776ac504f955d5fd6 /src/ast/expr.cpp
parent15284f127f4c622bf4d67d8d8c44e1799f84e7cb (diff)
downloadmrust-8d1acfa3993e64b0266365379602799350855f3f.tar.gz
Type propagation coming along
Diffstat (limited to 'src/ast/expr.cpp')
-rw-r--r--src/ast/expr.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ast/expr.cpp b/src/ast/expr.cpp
index 026a54c1..1009709b 100644
--- a/src/ast/expr.cpp
+++ b/src/ast/expr.cpp
@@ -44,6 +44,8 @@ SERIALISE_TYPE(Expr::, "Expr", {
else _(ExprNode_Tuple)
else _(ExprNode_NamedValue)
else _(ExprNode_Field)
+ else _(ExprNode_Deref)
+ else _(ExprNode_Cast)
else _(ExprNode_CallPath)
else _(ExprNode_BinOp)
else
@@ -178,6 +180,13 @@ SERIALISE_TYPE_S(ExprNode_Field, {
s.item(m_name);
})
+void ExprNode_Deref::visit(NodeVisitor& nv) {
+ nv.visit(*this);
+}
+SERIALISE_TYPE_S(ExprNode_Deref, {
+ s.item(m_value);
+});
+
void ExprNode_Cast::visit(NodeVisitor& nv) {
nv.visit(*this);
}
@@ -325,6 +334,11 @@ void NodeVisitor::visit(ExprNode_Field& node)
DEBUG("DEF - ExprNode_Field");
visit(node.m_obj);
}
+void NodeVisitor::visit(ExprNode_Deref& node)
+{
+ DEBUG("DEF - ExprNode_Deref");
+ visit(node.m_value);
+}
void NodeVisitor::visit(ExprNode_Cast& node)
{
DEBUG("DEF - ExprNode_Cast");