diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2011-08-08 15:53:31 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-08-08 15:53:41 -0700 |
| commit | b54e7e45069a84e9e9ee6ef3431f733d96d93586 (patch) | |
| tree | 67ec4b8273da05a6f16ff6255fdb5422219631d6 /src/comp/syntax/parse | |
| parent | 3dda9aabf217d59881970f847b06338d417f6f6f (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.rs | 2 |
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()}; |
