From 2884c722fea91866cefda99eb0ba3a4b64dfd94f Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Tue, 25 Oct 2011 14:31:56 +0200 Subject: Step one towards new type param kind syntax Issue #1067 Needs a snapshot to finalize. --- src/comp/syntax/parse/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/comp/syntax/parse') diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 4df2b6ab3cf..9f478f7969f 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1739,7 +1739,11 @@ fn parse_ty_param(p: parser) -> ast::ty_param { alt p.peek() { token::TILDE. { p.bump(); ast::kind_unique } token::AT. { p.bump(); ast::kind_shared } - _ { ast::kind_pinned } + _ { + if eat_word(p, "pinned") { ast::kind_pinned } + else if eat_word(p, "unique") { ast::kind_unique } + else { ast::kind_shared } + } }; ret {ident: parse_ident(p), kind: k}; } -- cgit 1.4.1-3-g733a5