parent
ffae642663
commit
e83a115d79
2 changed files with 11 additions and 1 deletions
|
|
@ -2285,7 +2285,11 @@ fn parse_native_view(&parser p) -> vec[@ast::view_item] {
|
|||
|
||||
fn parse_crate_from_source_file(&parser p) -> @ast::crate {
|
||||
auto lo = p.get_lo_pos();
|
||||
auto m = parse_mod_items(p, token::EOF, []);
|
||||
// FIXME (issue #487): Do something with these attrs
|
||||
auto crate_attrs = parse_inner_attrs_and_next(p);
|
||||
auto first_item_outer_attrs = crate_attrs._1;
|
||||
auto m = parse_mod_items(p, token::EOF,
|
||||
first_item_outer_attrs);
|
||||
let vec[@ast::crate_directive] cdirs = [];
|
||||
ret @spanned(lo, p.get_lo_pos(), rec(directives=cdirs, module=m));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
// xfail-stage0
|
||||
|
||||
// These are attributes of the implicit crate. Really this just needs to parse
|
||||
// for completeness since .rs files linked from .rc files support this
|
||||
// notation to specify their module's attributes
|
||||
#[attr1 = "val"];
|
||||
#[attr2 = "val"];
|
||||
|
||||
// These are are attributes of the following mod
|
||||
#[attr1 = "val"]
|
||||
#[attr2 = "val"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue