aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-09 17:50:39 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-10 18:10:57 +0000
commit1a2c0911f0e818328a8909b1f5ba0685b6eca351 (patch)
treedb3d500a783d5794a1a190f7172d6b8205b0db4e /gcc/rust/resolve
parentcb9998216d76ccc62b45fcf01b3a0928a026f7ed (diff)
downloadgcc-1a2c0911f0e818328a8909b1f5ba0685b6eca351.zip
gcc-1a2c0911f0e818328a8909b1f5ba0685b6eca351.tar.gz
gcc-1a2c0911f0e818328a8909b1f5ba0685b6eca351.tar.bz2
Support Simple LoopExpr
This is the building block for the rest of loops where we have a basic infinite loop. Break/Continue reliest on the resolution of labels and breaks can also make a loop into a BlockExpr Fixes #106
Diffstat (limited to 'gcc/rust/resolve')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-expr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.h b/gcc/rust/resolve/rust-ast-resolve-expr.h
index d563f93..e8ee8b3 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.h
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.h
@@ -241,6 +241,11 @@ public:
ResolveExpr::go (expr.get_receiver_expr ().get (), expr.get_node_id ());
}
+ void visit (AST::LoopExpr &expr)
+ {
+ ResolveExpr::go (expr.get_loop_block ().get (), expr.get_node_id ());
+ }
+
private:
ResolveExpr (NodeId parent) : ResolverBase (parent) {}
};