diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 17:01:42 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-01-18 21:29:02 -0800 |
| commit | bf83fd30919d7c5487391f83a36e5b7ce56e883c (patch) | |
| tree | 040933f2bdc2d61103a1bf8a5eda253e4940f489 /src/comp | |
| parent | 3ebf7b42bd930de73f376dd1b3f2060e00b0fe6d (diff) | |
| download | rust-bf83fd30919d7c5487391f83a36e5b7ce56e883c.tar.gz rust-bf83fd30919d7c5487391f83a36e5b7ce56e883c.zip | |
Allow nullary tag names to be qualified
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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; |
