rustdoc: Rename astsrv::ctxt.map to ast_map
This commit is contained in:
parent
c590bdeea4
commit
38908581f7
4 changed files with 11 additions and 11 deletions
|
@ -19,7 +19,7 @@ export exec;
|
|||
|
||||
type ctxt = {
|
||||
ast: @ast::crate,
|
||||
map: ast_map::map
|
||||
ast_map: ast_map::map
|
||||
};
|
||||
|
||||
type ctxt_handler<T> = fn~(ctxt: ctxt) -> T;
|
||||
|
@ -48,7 +48,7 @@ fn build_ctxt(ast: @ast::crate) -> ctxt {
|
|||
|
||||
{
|
||||
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 srv = mk_srv_from_str(source);
|
||||
exec(srv) {|ctxt|
|
||||
assert ctxt.map.size() != 0u
|
||||
assert ctxt.ast_map.size() != 0u
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ fn parse_item_attrs<T>(
|
|||
id: doc::ast_id,
|
||||
parse_attrs: fn~([ast::attribute]) -> T) -> T {
|
||||
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 }
|
||||
};
|
||||
parse_attrs(attrs)
|
||||
|
@ -263,7 +263,7 @@ fn fold_enum(
|
|||
desc: attrs.desc,
|
||||
variants: vec::map(doc.variants) {|variant|
|
||||
let attrs = astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(doc.id) {
|
||||
alt ctxt.ast_map.get(doc.id) {
|
||||
ast_map::node_item(@{
|
||||
node: ast::item_enum(ast_variants, _), _
|
||||
}) {
|
||||
|
|
|
@ -155,7 +155,7 @@ fn is_exported_from_mod(
|
|||
item_name: str
|
||||
) -> bool {
|
||||
astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(mod_id) {
|
||||
alt ctxt.ast_map.get(mod_id) {
|
||||
ast_map::node_item(item) {
|
||||
alt item.node {
|
||||
ast::item_mod(m) {
|
||||
|
|
|
@ -41,7 +41,7 @@ fn fold_fn(
|
|||
|
||||
fn get_fn_sig(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> {
|
||||
astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(fn_id) {
|
||||
alt ctxt.ast_map.get(fn_id) {
|
||||
ast_map::node_item(@{
|
||||
ident: ident,
|
||||
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> {
|
||||
astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(fn_id) {
|
||||
alt ctxt.ast_map.get(fn_id) {
|
||||
ast_map::node_item(@{
|
||||
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)] {
|
||||
astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(fn_id) {
|
||||
alt ctxt.ast_map.get(fn_id) {
|
||||
ast_map::node_item(@{
|
||||
node: ast::item_fn(decl, _, _), _
|
||||
}) {
|
||||
|
@ -161,7 +161,7 @@ fn fold_const(
|
|||
|
||||
~{
|
||||
ty: some(astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(doc.id) {
|
||||
alt ctxt.ast_map.get(doc.id) {
|
||||
ast_map::node_item(@{
|
||||
node: ast::item_const(ty, _), _
|
||||
}) {
|
||||
|
@ -191,7 +191,7 @@ fn fold_enum(
|
|||
~{
|
||||
variants: vec::map(doc.variants) {|variant|
|
||||
let sig = astsrv::exec(srv) {|ctxt|
|
||||
alt ctxt.map.get(doc.id) {
|
||||
alt ctxt.ast_map.get(doc.id) {
|
||||
ast_map::node_item(@{
|
||||
node: ast::item_enum(ast_variants, _), _
|
||||
}) {
|
||||
|
|
Loading…
Add table
Reference in a new issue