1
Fork 0

convert ast::{ty_field_,ty_method} into a struct

This commit is contained in:
Erick Tryzelaar 2013-01-15 15:03:49 -08:00 committed by Tim Chevalier
parent 8cdc3fda11
commit 5ba7e55a4c
5 changed files with 47 additions and 21 deletions

View file

@ -421,10 +421,16 @@ impl Parser {
debug!("parse_trait_methods(): parsing required method");
// NB: at the moment, visibility annotations on required
// methods are ignored; this could change.
required({ident: ident, attrs: attrs,
purity: pur, decl: d, tps: tps,
self_ty: self_ty,
id: p.get_id(), span: mk_sp(lo, hi)})
required(ty_method {
ident: ident,
attrs: attrs,
purity: pur,
decl: d,
tps: tps,
self_ty: self_ty,
id: p.get_id(),
span: mk_sp(lo, hi)
})
}
token::LBRACE => {
debug!("parse_trait_methods(): parsing provided method");
@ -467,9 +473,9 @@ impl Parser {
spanned(
lo,
ty.span.hi,
{
ast::ty_field_ {
ident: id,
mt: ast::mt { ty: ty, mutbl: mutbl }
mt: ast::mt { ty: ty, mutbl: mutbl },
}
)
}