rustdoc: Rename util mod to par

This commit is contained in:
Brian Anderson 2012-02-26 23:10:12 -08:00
parent c15127fe3e
commit 3bfa457039
11 changed files with 30 additions and 30 deletions

View File

@ -154,7 +154,7 @@ fn merge_arg_attrs(
docs: [doc::argdoc],
attrs: [attr_parser::arg_attrs]
) -> [doc::argdoc] {
util::anymap(docs) {|doc|
par::anymap(docs) {|doc|
alt vec::find(attrs) {|attr|
attr.name == doc.name
} {
@ -239,7 +239,7 @@ fn fold_enum(
let doc = fold::default_seq_fold_enum(fold, doc);
{
variants: util::anymap(doc.variants) {|variant|
variants: par::anymap(doc.variants) {|variant|
let attrs = astsrv::exec(srv) {|ctxt|
alt check ctxt.ast_map.get(doc.id()) {
ast_map::node_item(@{
@ -288,7 +288,7 @@ fn fold_res(
let attrs = parse_item_attrs(srv, doc.id(), attr_parser::parse_res);
{
args: util::anymap(doc.args) {|doc|
args: par::anymap(doc.args) {|doc|
alt vec::find(attrs.args) {|attr|
attr.name == doc.name
} {
@ -349,7 +349,7 @@ fn merge_method_attrs(
ast_map::node_item(@{
node: ast::item_iface(_, methods), _
}, _) {
util::seqmap(methods) {|method|
par::seqmap(methods) {|method|
(method.ident,
(attr_parser::parse_basic(method.attrs),
attr_parser::parse_method(method.attrs)
@ -359,7 +359,7 @@ fn merge_method_attrs(
ast_map::node_item(@{
node: ast::item_impl(_, _, _, methods), _
}, _) {
util::seqmap(methods) {|method|
par::seqmap(methods) {|method|
(method.ident,
(attr_parser::parse_basic(method.attrs),
attr_parser::parse_method(method.attrs)

View File

@ -45,7 +45,7 @@ fn fold_fn(fold: fold::fold<op>, doc: doc::fndoc) -> doc::fndoc {
let doc = fold::default_seq_fold_fn(fold, doc);
{
args: util::anymap(doc.args) {|doc|
args: par::anymap(doc.args) {|doc|
{
desc: maybe_apply_op(fold.ctxt, doc.desc)
with doc
@ -64,7 +64,7 @@ fn fold_enum(fold: fold::fold<op>, doc: doc::enumdoc) -> doc::enumdoc {
let doc = fold::default_seq_fold_enum(fold, doc);
{
variants: util::anymap(doc.variants) {|variant|
variants: par::anymap(doc.variants) {|variant|
{
desc: maybe_apply_op(fold.ctxt, variant.desc)
with variant
@ -78,7 +78,7 @@ fn fold_res(fold: fold::fold<op>, doc: doc::resdoc) -> doc::resdoc {
let doc = fold::default_seq_fold_res(fold, doc);
{
args: util::anymap(doc.args) {|arg|
args: par::anymap(doc.args) {|arg|
{
desc: maybe_apply_op(fold.ctxt, arg.desc)
with arg
@ -98,11 +98,11 @@ fn fold_iface(fold: fold::fold<op>, doc: doc::ifacedoc) -> doc::ifacedoc {
}
fn apply_to_methods(op: op, docs: [doc::methoddoc]) -> [doc::methoddoc] {
util::anymap(docs) {|doc|
par::anymap(docs) {|doc|
{
brief: maybe_apply_op(op, doc.brief),
desc: maybe_apply_op(op, doc.desc),
args: util::anymap(doc.args) {|doc|
args: par::anymap(doc.args) {|doc|
{
desc: maybe_apply_op(op, doc.desc)
with doc

View File

@ -41,7 +41,7 @@ fn fold_iface(fold: fold::fold<()>, doc: doc::ifacedoc) -> doc::ifacedoc {
let doc =fold::default_seq_fold_iface(fold, doc);
{
methods: util::anymap(doc.methods) {|doc|
methods: par::anymap(doc.methods) {|doc|
let (brief, desc) = modify(doc.brief, doc.desc);
{
@ -58,7 +58,7 @@ fn fold_impl(fold: fold::fold<()>, doc: doc::impldoc) -> doc::impldoc {
let doc =fold::default_seq_fold_impl(fold, doc);
{
methods: util::anymap(doc.methods) {|doc|
methods: par::anymap(doc.methods) {|doc|
let (brief, desc) = modify(doc.brief, doc.desc);
{

View File

@ -112,7 +112,7 @@ fn nmoddoc_from_mod(
) -> doc::nmoddoc {
{
item: itemdoc,
fns: util::seqmap(module.items) {|item|
fns: par::seqmap(module.items) {|item|
let itemdoc = mk_itemdoc(item.id, item.ident);
alt item.node {
ast::native_item_fn(decl, _) {
@ -150,7 +150,7 @@ fn should_extract_fn_args() {
}
fn argdocs_from_args(args: [ast::arg]) -> [doc::argdoc] {
util::seqmap(args, argdoc_from_arg)
par::seqmap(args, argdoc_from_arg)
}
fn argdoc_from_arg(arg: ast::arg) -> doc::argdoc {
@ -188,7 +188,7 @@ fn enumdoc_from_enum(
fn variantdocs_from_variants(
variants: [ast::variant]
) -> [doc::variantdoc] {
util::seqmap(variants, variantdoc_from_variant)
par::seqmap(variants, variantdoc_from_variant)
}
fn variantdoc_from_variant(variant: ast::variant) -> doc::variantdoc {
@ -242,7 +242,7 @@ fn ifacedoc_from_iface(
) -> doc::ifacedoc {
{
item: itemdoc,
methods: util::seqmap(methods) {|method|
methods: par::seqmap(methods) {|method|
{
name: method.ident,
brief: none,
@ -285,7 +285,7 @@ fn impldoc_from_impl(
item: itemdoc,
iface_ty: none,
self_ty: none,
methods: util::seqmap(methods) {|method|
methods: par::seqmap(methods) {|method|
{
name: method.ident,
brief: none,

View File

@ -153,7 +153,7 @@ fn default_any_fold_mod<T:send>(
) -> doc::moddoc {
{
item: fold.fold_item(fold, doc.item),
items: util::anymap(doc.items) {|itemtag|
items: par::anymap(doc.items) {|itemtag|
fold_itemtag(fold, itemtag)
}
with doc
@ -166,7 +166,7 @@ fn default_seq_fold_mod<T>(
) -> doc::moddoc {
{
item: fold.fold_item(fold, doc.item),
items: util::seqmap(doc.items) {|itemtag|
items: par::seqmap(doc.items) {|itemtag|
fold_itemtag(fold, itemtag)
}
with doc
@ -179,7 +179,7 @@ fn default_par_fold_mod<T:send>(
) -> doc::moddoc {
{
item: fold.fold_item(fold, doc.item),
items: util::parmap(doc.items) {|itemtag|
items: par::parmap(doc.items) {|itemtag|
fold_itemtag(fold, itemtag)
}
with doc
@ -192,7 +192,7 @@ fn default_any_fold_nmod<T:send>(
) -> doc::nmoddoc {
{
item: fold.fold_item(fold, doc.item),
fns: util::anymap(doc.fns) {|fndoc|
fns: par::anymap(doc.fns) {|fndoc|
fold.fold_fn(fold, fndoc)
}
with doc
@ -205,7 +205,7 @@ fn default_seq_fold_nmod<T>(
) -> doc::nmoddoc {
{
item: fold.fold_item(fold, doc.item),
fns: util::seqmap(doc.fns) {|fndoc|
fns: par::seqmap(doc.fns) {|fndoc|
fold.fold_fn(fold, fndoc)
}
with doc
@ -218,7 +218,7 @@ fn default_par_fold_nmod<T:send>(
) -> doc::nmoddoc {
{
item: fold.fold_item(fold, doc.item),
fns: util::parmap(doc.fns) {|fndoc|
fns: par::parmap(doc.fns) {|fndoc|
fold.fold_fn(fold, fndoc)
}
with doc

View File

@ -228,7 +228,7 @@ fn write_sig(ctxt: ctxt, sig: option<str>) {
fn code_block_indent(s: str) -> str {
let lines = str::lines_any(s);
let indented = util::anymap(lines, { |line| #fmt(" %s", line) });
let indented = par::anymap(lines, { |line| #fmt(" %s", line) });
str::connect(indented, "\n")
}

View File

@ -105,7 +105,7 @@ fn fold_iface(
}
fn prune_methods(docs: [doc::methoddoc]) -> [doc::methoddoc] {
util::anymap(docs) {|doc|
par::anymap(docs) {|doc|
{
args: prune_args(doc.args),
return: prune_return(doc.return)

View File

@ -35,4 +35,4 @@ mod sort_pass;
mod sort_item_name_pass;
mod sort_item_type_pass;
mod reexport_pass;
mod util;
mod par;

View File

@ -165,7 +165,7 @@ fn get_arg_tys(srv: astsrv::srv, fn_id: doc::ast_id) -> [(str, str)] {
}
fn decl_arg_tys(decl: ast::fn_decl) -> [(str, str)] {
util::seqmap(decl.inputs) {|arg|
par::seqmap(decl.inputs) {|arg|
(arg.ident, pprust::ty_to_str(arg.ty))
}
}
@ -217,7 +217,7 @@ fn fold_enum(
let srv = fold.ctxt;
{
variants: util::anymap(doc.variants) {|variant|
variants: par::anymap(doc.variants) {|variant|
let sig = astsrv::exec(srv) {|ctxt|
alt check ctxt.ast_map.get(doc.id()) {
ast_map::node_item(@{
@ -296,7 +296,7 @@ fn merge_methods(
item_id: doc::ast_id,
docs: [doc::methoddoc]
) -> [doc::methoddoc] {
util::anymap(docs) {|doc|
par::anymap(docs) {|doc|
{
args: merge_method_arg_tys(
srv,

View File

@ -63,7 +63,7 @@ fn unindent(s: str) -> str {
if check vec::is_not_empty(lines) {
let unindented = [str::trim(vec::head(lines))]
+ util::anymap(vec::tail(lines)) {|line|
+ par::anymap(vec::tail(lines)) {|line|
if str::is_whitespace(line) {
line
} else {