From bf83fd30919d7c5487391f83a36e5b7ce56e883c Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 18 Jan 2012 17:01:42 -0800 Subject: Allow nullary tag names to be qualified --- src/comp/syntax/parse/parser.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/comp') diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 174851c4fcb..e0b00d65f70 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1493,10 +1493,9 @@ fn parse_pat(p: parser) -> @ast::pat { } _ { true } } { - hi = p.span.hi; - let name = parse_value_ident(p); + let name = parse_path(p); let sub = eat(p, token::AT) ? some(parse_pat(p)) : none; - pat = ast::pat_ident(ident_to_path(mk_sp(lo, hi), name), sub); + pat = ast::pat_ident(name, sub); } else { let tag_path = parse_path_and_ty_param_substs(p, true); hi = tag_path.span.hi; -- cgit 1.4.1-3-g733a5