initial draft of fix for issue #2498:

1. make /// ... and //! ... and /** ... */ and /*! ... */ into sugar for #[doc = ...] attributes.
2. add a script in etc/ to help converting doc-attributes to doc-comments
3. add some functions to core::str to help with (1)
This commit is contained in:
Gareth Daniel Smith
2012-06-30 11:54:54 +01:00
parent d7823de5e2
commit 0b653ab953
14 changed files with 454 additions and 59 deletions

View File

@@ -102,7 +102,8 @@ fn fold_meta_item_(&&mi: @meta_item, fld: ast_fold) -> @meta_item {
fn fold_attribute_(at: attribute, fld: ast_fold) ->
attribute {
ret {node: {style: at.node.style,
value: *fold_meta_item_(@at.node.value, fld)},
value: *fold_meta_item_(@at.node.value, fld),
is_sugared_doc: at.node.is_sugared_doc },
span: fld.new_span(at.span)};
}
//used in noop_fold_foreign_item and noop_fold_fn_decl