rustc: Support both meta tags and attributes for crate metadata

This is a transitional patch for converting from 'meta' to attributes.

Issue #487
This commit is contained in:
Brian Anderson 2011-06-17 15:07:34 -07:00
parent 81a187e8be
commit 6e6bc5076c
2 changed files with 8 additions and 4 deletions

View File

@ -249,6 +249,10 @@ mod write {
*
*/
iter crate_export_metas(&ast::crate c) -> @ast::meta_item {
for (ast::attribute attr in c.node.attrs) {
put @attr.node.value;
}
for (@ast::crate_directive cdir in c.node.directives) {
alt (cdir.node) {
case (ast::cdir_meta(?v, ?mis)) {

View File

@ -1,7 +1,7 @@
meta export (name = "std",
vers = "0.1",
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
url = "http://rust-lang.org/src/std");
#[name = "std"];
#[vers = "0.1"];
#[uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297"];
#[url = "http://rust-lang.org/src/std"];
meta (comment = "Rust standard library",
license = "BSD");