From ebb16e6a25da9694dabe19ecea24baeb7007ba1f Mon Sep 17 00:00:00 2001 From: Paul Stansifer Date: Mon, 15 Aug 2011 13:33:12 -0700 Subject: Use span stacks to track macro expansion for less troublesome error messages. --- src/comp/syntax/parse/parser.rs | 3 ++- 1 file changed, 2 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 f8badc33b6f..19f058d7ee2 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1478,7 +1478,8 @@ fn parse_pat(p: &parser) -> @ast::pat { if p.peek() == token::RPAREN { hi = p.get_hi_pos(); p.bump(); - pat = ast::pat_lit(@{node: ast::lit_nil, span: {lo: lo, hi: hi}}); + pat = ast::pat_lit(@{node: ast::lit_nil, + span: ast::mk_sp(lo,hi)}); } else { let fields = ~[parse_pat(p)]; while p.peek() == token::COMMA { -- cgit 1.4.1-3-g733a5