about summary refs log tree commit diff
path: root/src/libsyntax/parse/eval.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-16 14:22:09 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-16 14:22:09 -0800
commit4a5b28ff0cae0e48d8e3e0cf45728e438390d7ee (patch)
tree9c7d0bed694a4b1252eb69010f61f27dadc82887 /src/libsyntax/parse/eval.rs
parent2374154ded19a247be0053d71f5bcdd22b95462a (diff)
downloadrust-4a5b28ff0cae0e48d8e3e0cf45728e438390d7ee.tar.gz
rust-4a5b28ff0cae0e48d8e3e0cf45728e438390d7ee.zip
Stop tracking CodeMap offsets in the parse session. Big simplification
Diffstat (limited to 'src/libsyntax/parse/eval.rs')
-rw-r--r--src/libsyntax/parse/eval.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs
index 47dbc0cd6ee..f08f1954464 100644
--- a/src/libsyntax/parse/eval.rs
+++ b/src/libsyntax/parse/eval.rs
@@ -1,4 +1,3 @@
-use parse::update_parse_sess_position;
 use parser::{Parser, SOURCE_FILE};
 use attr::parser_attr;
 
@@ -63,11 +62,10 @@ fn parse_companion_mod(cx: ctx, prefix: &Path, suffix: &Option<Path>)
     let modpath = &companion_file(prefix, suffix);
     if file_exists(modpath) {
         debug!("found companion mod");
-        let (p0, r0) = new_parser_etc_from_file(cx.sess, cx.cfg,
-                                                modpath, SOURCE_FILE);
+        let p0 = new_parser_from_file(cx.sess, cx.cfg,
+                                      modpath, SOURCE_FILE);
         let inner_attrs = p0.parse_inner_attrs_and_next();
         let m0 = p0.parse_mod_items(token::EOF, inner_attrs.next);
-        update_parse_sess_position(&cx.sess, &r0);
         return (m0.view_items, m0.items, inner_attrs.inner);
     } else {
         return (~[], ~[], ~[]);
@@ -93,9 +91,9 @@ fn eval_crate_directive(cx: ctx, cdir: @ast::crate_directive, prefix: &Path,
         } else {
             prefix.push_many(file_path.components)
         };
-        let (p0, r0) =
-            new_parser_etc_from_file(cx.sess, cx.cfg,
-                                     &full_path, SOURCE_FILE);
+        let p0 =
+            new_parser_from_file(cx.sess, cx.cfg,
+                                 &full_path, SOURCE_FILE);
         let inner_attrs = p0.parse_inner_attrs_and_next();
         let mod_attrs = vec::append(attrs, inner_attrs.inner);
         let first_item_outer_attrs = inner_attrs.next;
@@ -104,8 +102,6 @@ fn eval_crate_directive(cx: ctx, cdir: @ast::crate_directive, prefix: &Path,
         let i = p0.mk_item(cdir.span.lo, cdir.span.hi,
                            /* FIXME (#2543) */ copy id,
                            ast::item_mod(m0), vis, mod_attrs);
-        // Thread defids, chpos and byte_pos through the parsers
-        update_parse_sess_position(&cx.sess, &r0);
         items.push(i);
       }
       ast::cdir_dir_mod(vis, id, cdirs, attrs) => {