rustdoc: Rename astsrv::ctxt.map to ast_map

This commit is contained in:
Brian Anderson
2012-01-25 21:21:21 -08:00
parent c590bdeea4
commit 38908581f7
4 changed files with 11 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ export exec;
type ctxt = { type ctxt = {
ast: @ast::crate, ast: @ast::crate,
map: ast_map::map ast_map: ast_map::map
}; };
type ctxt_handler<T> = fn~(ctxt: ctxt) -> T; type ctxt_handler<T> = fn~(ctxt: ctxt) -> T;
@@ -48,7 +48,7 @@ fn build_ctxt(ast: @ast::crate) -> ctxt {
{ {
ast: ast, ast: ast,
map: ast_map::map_crate(*ast) ast_map: ast_map::map_crate(*ast)
} }
} }
@@ -76,7 +76,7 @@ mod tests {
let source = "fn a() { }"; let source = "fn a() { }";
let srv = mk_srv_from_str(source); let srv = mk_srv_from_str(source);
exec(srv) {|ctxt| exec(srv) {|ctxt|
assert ctxt.map.size() != 0u assert ctxt.ast_map.size() != 0u
}; };
} }

View File

@@ -66,7 +66,7 @@ fn parse_item_attrs<T>(
id: doc::ast_id, id: doc::ast_id,
parse_attrs: fn~([ast::attribute]) -> T) -> T { parse_attrs: fn~([ast::attribute]) -> T) -> T {
astsrv::exec(srv) {|ctxt| astsrv::exec(srv) {|ctxt|
let attrs = alt ctxt.map.get(id) { let attrs = alt ctxt.ast_map.get(id) {
ast_map::node_item(item) { item.attrs } ast_map::node_item(item) { item.attrs }
}; };
parse_attrs(attrs) parse_attrs(attrs)
@@ -263,7 +263,7 @@ fn fold_enum(
desc: attrs.desc, desc: attrs.desc,
variants: vec::map(doc.variants) {|variant| variants: vec::map(doc.variants) {|variant|
let attrs = astsrv::exec(srv) {|ctxt| let attrs = astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(doc.id) { alt ctxt.ast_map.get(doc.id) {
ast_map::node_item(@{ ast_map::node_item(@{
node: ast::item_enum(ast_variants, _), _ node: ast::item_enum(ast_variants, _), _
}) { }) {

View File

@@ -155,7 +155,7 @@ fn is_exported_from_mod(
item_name: str item_name: str
) -> bool { ) -> bool {
astsrv::exec(srv) {|ctxt| astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(mod_id) { alt ctxt.ast_map.get(mod_id) {
ast_map::node_item(item) { ast_map::node_item(item) {
alt item.node { alt item.node {
ast::item_mod(m) { ast::item_mod(m) {

View File

@@ -41,7 +41,7 @@ fn fold_fn(
fn get_fn_sig(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> { fn get_fn_sig(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> {
astsrv::exec(srv) {|ctxt| astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(fn_id) { alt ctxt.ast_map.get(fn_id) {
ast_map::node_item(@{ ast_map::node_item(@{
ident: ident, ident: ident,
node: ast::item_fn(decl, _, blk), _ node: ast::item_fn(decl, _, blk), _
@@ -79,7 +79,7 @@ fn merge_ret_ty(
fn get_ret_ty(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> { fn get_ret_ty(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> {
astsrv::exec(srv) {|ctxt| astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(fn_id) { alt ctxt.ast_map.get(fn_id) {
ast_map::node_item(@{ ast_map::node_item(@{
node: ast::item_fn(decl, _, _), _ node: ast::item_fn(decl, _, _), _
}) { }) {
@@ -130,7 +130,7 @@ fn merge_arg_tys(
fn get_arg_tys(srv: astsrv::srv, fn_id: doc::ast_id) -> [(str, str)] { fn get_arg_tys(srv: astsrv::srv, fn_id: doc::ast_id) -> [(str, str)] {
astsrv::exec(srv) {|ctxt| astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(fn_id) { alt ctxt.ast_map.get(fn_id) {
ast_map::node_item(@{ ast_map::node_item(@{
node: ast::item_fn(decl, _, _), _ node: ast::item_fn(decl, _, _), _
}) { }) {
@@ -161,7 +161,7 @@ fn fold_const(
~{ ~{
ty: some(astsrv::exec(srv) {|ctxt| ty: some(astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(doc.id) { alt ctxt.ast_map.get(doc.id) {
ast_map::node_item(@{ ast_map::node_item(@{
node: ast::item_const(ty, _), _ node: ast::item_const(ty, _), _
}) { }) {
@@ -191,7 +191,7 @@ fn fold_enum(
~{ ~{
variants: vec::map(doc.variants) {|variant| variants: vec::map(doc.variants) {|variant|
let sig = astsrv::exec(srv) {|ctxt| let sig = astsrv::exec(srv) {|ctxt|
alt ctxt.map.get(doc.id) { alt ctxt.ast_map.get(doc.id) {
ast_map::node_item(@{ ast_map::node_item(@{
node: ast::item_enum(ast_variants, _), _ node: ast::item_enum(ast_variants, _), _
}) { }) {