mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Remove expn_info box typedef from codemap
This commit is contained in:
parent
18a825bda0
commit
d115944809
@ -39,7 +39,11 @@ export loc;
|
||||
export get_filemap;
|
||||
export new_codemap;
|
||||
|
||||
struct span {lo: uint, hi: uint, expn_info: expn_info}
|
||||
struct span {
|
||||
lo: uint,
|
||||
hi: uint,
|
||||
expn_info: Option<@expn_info>
|
||||
}
|
||||
|
||||
impl span : cmp::Eq {
|
||||
pure fn eq(other: &span) -> bool {
|
||||
@ -59,11 +63,10 @@ impl<D: Deserializer> span: Deserializable<D> {
|
||||
}
|
||||
}
|
||||
|
||||
enum expn_info_ {
|
||||
enum expn_info {
|
||||
expanded_from({call_site: span,
|
||||
callie: {name: ~str, span: Option<span>}})
|
||||
}
|
||||
type expn_info = Option<@expn_info_>;
|
||||
|
||||
type filename = ~str;
|
||||
|
||||
|
@ -129,11 +129,11 @@ trait ext_ctxt {
|
||||
fn parse_sess() -> parse::parse_sess;
|
||||
fn cfg() -> ast::crate_cfg;
|
||||
fn print_backtrace();
|
||||
fn backtrace() -> expn_info;
|
||||
fn backtrace() -> Option<@expn_info>;
|
||||
fn mod_push(mod_name: ast::ident);
|
||||
fn mod_pop();
|
||||
fn mod_path() -> ~[ast::ident];
|
||||
fn bt_push(ei: codemap::expn_info_);
|
||||
fn bt_push(ei: codemap::expn_info);
|
||||
fn bt_pop();
|
||||
fn span_fatal(sp: span, msg: &str) -> !;
|
||||
fn span_err(sp: span, msg: &str);
|
||||
@ -153,7 +153,7 @@ fn mk_ctxt(parse_sess: parse::parse_sess,
|
||||
cfg: ast::crate_cfg) -> ext_ctxt {
|
||||
type ctxt_repr = {parse_sess: parse::parse_sess,
|
||||
cfg: ast::crate_cfg,
|
||||
mut backtrace: expn_info,
|
||||
mut backtrace: Option<@expn_info>,
|
||||
mut mod_path: ~[ast::ident],
|
||||
mut trace_mac: bool};
|
||||
impl ctxt_repr: ext_ctxt {
|
||||
@ -161,11 +161,11 @@ fn mk_ctxt(parse_sess: parse::parse_sess,
|
||||
fn parse_sess() -> parse::parse_sess { self.parse_sess }
|
||||
fn cfg() -> ast::crate_cfg { self.cfg }
|
||||
fn print_backtrace() { }
|
||||
fn backtrace() -> expn_info { self.backtrace }
|
||||
fn backtrace() -> Option<@expn_info> { self.backtrace }
|
||||
fn mod_push(i: ast::ident) { self.mod_path.push(i); }
|
||||
fn mod_pop() { self.mod_path.pop(); }
|
||||
fn mod_path() -> ~[ast::ident] { return self.mod_path; }
|
||||
fn bt_push(ei: codemap::expn_info_) {
|
||||
fn bt_push(ei: codemap::expn_info) {
|
||||
match ei {
|
||||
expanded_from({call_site: cs, callie: callie}) => {
|
||||
self.backtrace =
|
||||
|
Loading…
Reference in New Issue
Block a user