From 55a2fd18ec8f2e9aeee699296b7a500b49ff0c5e Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 19 Dec 2011 12:50:31 -0800 Subject: implement capture clauses (move, in particular) and integrate them into type state and so forth --- src/comp/syntax/ast.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/comp/syntax') diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index 608796696d6..4f6b5cf3744 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -261,6 +261,10 @@ tag expr_ { expr_mac(mac); } +// AST nodes that represent a capture clause, which is used to declare +// variables that are copied or moved explicitly into the closure. In some +// cases, local variables can also be copied implicitly into the closure if +// they are used in the closure body. type capture_item = { id: int, name: ident, // Currently, can only capture a local var. -- cgit 1.4.1-3-g733a5