about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-04-21 17:26:41 -0700
committerJohn Clements <clements@racket-lang.org>2013-04-28 09:51:16 -0700
commitaa346401baae03aeeba5d3ff10006eae7b60ca0e (patch)
tree71ce29fcf7512d7b4973c2daa5d4c6e91ea514b6 /src/libsyntax
parentd2aee7b3e68c33edc410485f7ccadba1484c3bc3 (diff)
downloadrust-aa346401baae03aeeba5d3ff10006eae7b60ca0e.tar.gz
rust-aa346401baae03aeeba5d3ff10006eae7b60ca0e.zip
removed unneeded argument to parse_record
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 724a5d46c35..facf10c3cd9 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1123,11 +1123,12 @@ pub impl Parser {
         }
     }
 
-    fn parse_field(&self, sep: token::Token) -> field {
+    // parse ident COLON expr
+    fn parse_field(&self) -> field {
         let lo = self.span.lo;
         let m = self.parse_mutability();
         let i = self.parse_ident();
-        self.expect(&sep);
+        self.expect(&token::COLON);
         let e = self.parse_expr();
         spanned(lo, e.span.hi, ast::field_ { mutbl: m, ident: i, expr: e })
     }
@@ -1323,7 +1324,7 @@ pub impl Parser {
                     let mut fields = ~[];
                     let mut base = None;
 
-                    fields.push(self.parse_field(token::COLON));
+                    fields.push(self.parse_field());
                     while *self.token != token::RBRACE {
                         if self.try_parse_obsolete_with() {
                             break;
@@ -1340,7 +1341,7 @@ pub impl Parser {
                             // Accept an optional trailing comma.
                             break;
                         }
-                        fields.push(self.parse_field(token::COLON));
+                        fields.push(self.parse_field());
                     }
 
                     hi = pth.span.hi;