summary refs log tree commit diff
path: root/src/libsyntax/ext/format.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-10-27 19:22:52 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-10-28 15:55:37 +1100
commitd8b1fa0ae0c27e54d3539190683c01e194d36fbd (patch)
tree0a03a2995fdbc9d616be18904b2311be854617cf /src/libsyntax/ext/format.rs
parentbd7138dd698dde29fb4d7fd34529a863b85d947e (diff)
downloadrust-d8b1fa0ae0c27e54d3539190683c01e194d36fbd.tar.gz
rust-d8b1fa0ae0c27e54d3539190683c01e194d36fbd.zip
Use PascalCase for token variants
Diffstat (limited to 'src/libsyntax/ext/format.rs')
-rw-r--r--src/libsyntax/ext/format.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs
index 87cd61c9b22..fdf61d4abd9 100644
--- a/src/libsyntax/ext/format.rs
+++ b/src/libsyntax/ext/format.rs
@@ -91,7 +91,7 @@ fn parse_args(ecx: &mut ExtCtxt, sp: Span, allow_method: bool,
     // Parse the leading function expression (maybe a block, maybe a path)
     let invocation = if allow_method {
         let e = p.parse_expr();
-        if !p.eat(&token::COMMA) {
+        if !p.eat(&token::Comma) {
             ecx.span_err(sp, "expected token: `,`");
             return (Call(e), None);
         }
@@ -99,28 +99,28 @@ fn parse_args(ecx: &mut ExtCtxt, sp: Span, allow_method: bool,
     } else {
         Call(p.parse_expr())
     };
-    if !p.eat(&token::COMMA) {
+    if !p.eat(&token::Comma) {
         ecx.span_err(sp, "expected token: `,`");
         return (invocation, None);
     }
 
-    if p.token == token::EOF {
+    if p.token == token::Eof {
         ecx.span_err(sp, "requires at least a format string argument");
         return (invocation, None);
     }
     let fmtstr = p.parse_expr();
     let mut named = false;
-    while p.token != token::EOF {
-        if !p.eat(&token::COMMA) {
+    while p.token != token::Eof {
+        if !p.eat(&token::Comma) {
             ecx.span_err(sp, "expected token: `,`");
             return (invocation, None);
         }
-        if p.token == token::EOF { break } // accept trailing commas
+        if p.token == token::Eof { break } // accept trailing commas
         if named || (token::is_ident(&p.token) &&
-                     p.look_ahead(1, |t| *t == token::EQ)) {
+                     p.look_ahead(1, |t| *t == token::Eq)) {
             named = true;
             let ident = match p.token {
-                token::IDENT(i, _) => {
+                token::Ident(i, _) => {
                     p.bump();
                     i
                 }
@@ -139,7 +139,7 @@ fn parse_args(ecx: &mut ExtCtxt, sp: Span, allow_method: bool,
             };
             let interned_name = token::get_ident(ident);
             let name = interned_name.get();
-            p.expect(&token::EQ);
+            p.expect(&token::Eq);
             let e = p.parse_expr();
             match names.find_equiv(&name) {
                 None => {}