about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-08-08 15:53:31 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-08-08 15:53:41 -0700
commitb54e7e45069a84e9e9ee6ef3431f733d96d93586 (patch)
tree67ec4b8273da05a6f16ff6255fdb5422219631d6 /src/comp/syntax/parse
parent3dda9aabf217d59881970f847b06338d417f6f6f (diff)
Add new arg-passing mode 'move' denoted with '-T'. Translate as pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index f0b25eb9a53..133b3c41bc7 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -597,6 +597,8 @@ fn parse_arg(p: &parser) -> ast::arg {
     expect(p, token::COLON);
     if eat(p, token::BINOP(token::AND)) {
         m = ast::alias(eat_word(p, "mutable"));
+    } else if eat(p, token::BINOP(token::MINUS)) {
+        m = ast::move;
     }
     let t: @ast::ty = parse_ty(p);
     ret {mode: m, ty: t, ident: i, id: p.get_id()};