提交 968089e4 编写于 作者: J John Clements

rename parse_class_item to parse_struct_decl_field

two problems with the old name: they're not called classes any more, and
the word "item" has a specific connotation in the parser
上级 b82724db
......@@ -3238,7 +3238,7 @@ fn parse_item_struct(&self) -> item_info {
is_tuple_like = false;
fields = ~[];
while *self.token != token::RBRACE {
match self.parse_class_item() {
match self.parse_struct_decl_field() {
dtor_decl(ref blk, ref attrs, s) => {
match the_dtor {
Some((_, _, s_first)) => {
......@@ -3355,7 +3355,8 @@ fn parse_dtor(&self, attrs: ~[attribute]) -> class_contents {
dtor_decl(body, attrs, mk_sp(lo, self.last_span.hi))
}
fn parse_class_item(&self) -> class_contents {
// parse an item in a struct definition
fn parse_struct_decl_field(&self) -> class_contents {
if self.try_parse_obsolete_priv_section() {
return members(~[]);
......@@ -3759,7 +3760,7 @@ fn parse_struct_def(&self) -> @struct_def {
let mut the_dtor: Option<(blk, ~[attribute], codemap::span)> = None;
let mut fields: ~[@struct_field] = ~[];
while *self.token != token::RBRACE {
match self.parse_class_item() {
match self.parse_struct_decl_field() {
dtor_decl(ref blk, ref attrs, s) => {
match the_dtor {
Some((_, _, s_first)) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册