about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 4d8fe833559..79728fade13 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1696,7 +1696,14 @@ fn parse_block_tail(p: &parser, lo: uint) -> ast::blk {
     ret spanned(lo, hi, bloc);
 }
 
-fn parse_ty_param(p: &parser) -> ast::ty_param { ret parse_ident(p); }
+fn parse_ty_param(p: &parser) -> ast::ty_param {
+    let k = alt p.peek() {
+      token::TILDE. { p.bump(); ast::kind_unique }
+      token::AT. { p.bump(); ast::kind_shared }
+      _ { ast::kind_pinned }
+    };
+    ret {ident: parse_ident(p), kind: k};
+}
 
 fn parse_ty_params(p: &parser) -> ast::ty_param[] {
     let ty_params: ast::ty_param[] = ~[];