about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-04-19 10:36:21 -0700
committerJohn Clements <clements@racket-lang.org>2013-04-28 09:51:15 -0700
commit968089e4228ef9c3caab0ce6e327356757cb52c1 (patch)
treee5e2ae5ce1a08980385ee018fa03afd866890572 /src/libsyntax/parse/parser.rs
parentb82724db22673d08b5af85ce13568dc761fe7b59 (diff)
downloadrust-968089e4228ef9c3caab0ce6e327356757cb52c1.tar.gz
rust-968089e4228ef9c3caab0ce6e327356757cb52c1.zip
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
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 880c431e15c..97ceb6f87a8 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3238,7 +3238,7 @@ pub impl Parser {
             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 @@ pub impl Parser {
         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 @@ pub impl Parser {
         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)) => {