about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-12-19 12:50:31 -0800
committerNiko Matsakis <niko@alum.mit.edu>2011-12-19 14:07:46 -0800
commit55a2fd18ec8f2e9aeee699296b7a500b49ff0c5e (patch)
treebbbe674e6f78eff5581363045d87f8ec856a534a /src/comp/syntax
parent41ae146057431d99d5ab5c87d385dbf787a10ea2 (diff)
downloadrust-55a2fd18ec8f2e9aeee699296b7a500b49ff0c5e.tar.gz
rust-55a2fd18ec8f2e9aeee699296b7a500b49ff0c5e.zip
implement capture clauses (move, in particular) and integrate
them into type state and so forth
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ast.rs4
1 files changed, 4 insertions, 0 deletions
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.