about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2013-05-03 02:36:24 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2013-05-03 02:36:24 +0900
commita0d8873097a587163887e701c08373a1571f8973 (patch)
tree5b28b1ec6b6f61824bed81ed804a2838843476ce /src/libsyntax/parse
parentb42ea7f9ef06be9a623a8a007ae3aecbb7d961a3 (diff)
downloadrust-a0d8873097a587163887e701c08373a1571f8973.tar.gz
rust-a0d8873097a587163887e701c08373a1571f8973.zip
More accurate spans
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/attr.rs2
-rw-r--r--src/libsyntax/parse/common.rs2
-rw-r--r--src/libsyntax/parse/parser.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 037b2c089f4..93584b00d39 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -156,7 +156,7 @@ impl parser_attr for Parser {
                 @spanned(lo, hi, ast::meta_list(name, inner_items))
             }
             _ => {
-                let hi = self.span.hi;
+                let hi = self.last_span.hi;
                 @spanned(lo, hi, ast::meta_word(name))
             }
         }
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs
index 01f80c032e9..1df6860fede 100644
--- a/src/libsyntax/parse/common.rs
+++ b/src/libsyntax/parse/common.rs
@@ -122,7 +122,7 @@ pub impl Parser {
     fn parse_path_list_ident(&self) -> ast::path_list_ident {
         let lo = self.span.lo;
         let ident = self.parse_ident();
-        let hi = self.span.hi;
+        let hi = self.last_span.hi;
         spanned(lo, hi, ast::path_list_ident_ { name: ident,
                                                 id: self.get_id() })
     }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 8459fc8c627..f0e9634d214 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2445,7 +2445,7 @@ pub impl Parser {
                     }
                 }
             }
-            hi = self.span.hi;
+            hi = self.last_span.hi;
           }
         }
         @ast::pat { id: self.get_id(), node: pat, span: mk_sp(lo, hi) }
@@ -4311,7 +4311,7 @@ pub impl Parser {
                                 rp: None,
                                 types: ~[] };
         return @spanned(lo,
-                        self.span.hi,
+                        self.last_span.hi,
                         view_path_simple(last, path, self.get_id()));
     }