diff options
| author | Haitao Li <lihaitao@gmail.com> | 2011-11-21 02:15:40 +0800 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-11-21 13:49:52 +0100 |
| commit | 5ca83553bc499e677a49b97075938abb5c70b4fd (patch) | |
| tree | 014110df635577ae09e5df641e869f8b61daf43d /src/comp/syntax/parse | |
| parent | 7a7f0604f4aff935f2b2ad4ad9c66f77c581dc93 (diff) | |
| download | rust-5ca83553bc499e677a49b97075938abb5c70b4fd.tar.gz rust-5ca83553bc499e677a49b97075938abb5c70b4fd.zip | |
rustc: Remove abi from ast::native_mod
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 2f6257f1064..8d7a3bcc414 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1981,8 +1981,7 @@ fn parse_native_item(p: parser, attrs: [ast::attribute]) -> } else { unexpected(p, p.peek()); } } -fn parse_native_mod_items(p: parser, abi: ast::native_abi, - first_item_attrs: [ast::attribute]) -> +fn parse_native_mod_items(p: parser, first_item_attrs: [ast::attribute]) -> ast::native_mod { // Shouldn't be any view items since we've already parsed an item attr let view_items = @@ -1996,8 +1995,7 @@ fn parse_native_mod_items(p: parser, abi: ast::native_abi, initial_attrs = []; items += [parse_native_item(p, attrs)]; } - ret {abi: abi, - view_items: view_items, + ret {view_items: view_items, items: items}; } @@ -2009,24 +2007,7 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item { let more_attrs = parse_inner_attrs_and_next(p); let inner_attrs = more_attrs.inner; let first_item_outer_attrs = more_attrs.next; - let abi = - alt attr::get_meta_item_value_str_by_name( - attrs + inner_attrs, "abi") { - none. { ast::native_abi_cdecl } - some("rust-intrinsic") { - ast::native_abi_rust_intrinsic - } - some("cdecl") { - ast::native_abi_cdecl - } - some("stdcall") { - ast::native_abi_stdcall - } - some(t) { - p.fatal("unsupported abi: " + t); - } - }; - let m = parse_native_mod_items(p, abi, first_item_outer_attrs); + let m = parse_native_mod_items(p, first_item_outer_attrs); let hi = p.get_hi_pos(); expect(p, token::RBRACE); ret mk_item(p, lo, hi, id, ast::item_native_mod(m), attrs + inner_attrs); |
