about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-10-23 04:39:58 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-10-26 09:53:30 +1100
commitdfb4163f8380e9a1aaf64a7474de30634bca4034 (patch)
tree4ba675a96bc22eb7c3e64f796f1753ff681b9fdd /src/libsyntax/parse
parent6a50b4d018b0e44b9e12560030ca7fb240107a68 (diff)
downloadrust-dfb4163f8380e9a1aaf64a7474de30634bca4034.tar.gz
rust-dfb4163f8380e9a1aaf64a7474de30634bca4034.zip
Use standard capitalisation for TokenTree variants
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/mod.rs50
-rw-r--r--src/libsyntax/parse/parser.rs16
2 files changed, 33 insertions, 33 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index a2e40282321..d7438f11a94 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -793,29 +793,29 @@ mod test {
         let tts = string_to_tts("macro_rules! zip (($a)=>($a))".to_string());
         let tts: &[ast::TokenTree] = tts.as_slice();
         match tts {
-            [ast::TTToken(_, _),
-             ast::TTToken(_, token::NOT),
-             ast::TTToken(_, _),
-             ast::TTDelimited(_, ast::TTToken(_, token::LPAREN),
+            [ast::TtToken(_, _),
+             ast::TtToken(_, token::NOT),
+             ast::TtToken(_, _),
+             ast::TtDelimited(_, ast::TtToken(_, token::LPAREN),
                           ref delim_elts,
-                          ast::TTToken(_, token::RPAREN))] => {
+                          ast::TtToken(_, token::RPAREN))] => {
                 let delim_elts: &[ast::TokenTree] = delim_elts.as_slice();
                 match delim_elts {
-                    [ast::TTDelimited(_, ast::TTToken(_, token::LPAREN),
+                    [ast::TtDelimited(_, ast::TtToken(_, token::LPAREN),
                                   ref first_set,
-                                  ast::TTToken(_, token::RPAREN)),
-                     ast::TTToken(_, token::FAT_ARROW),
-                     ast::TTDelimited(_, ast::TTToken(_, token::LPAREN),
+                                  ast::TtToken(_, token::RPAREN)),
+                     ast::TtToken(_, token::FAT_ARROW),
+                     ast::TtDelimited(_, ast::TtToken(_, token::LPAREN),
                                   ref second_set,
-                                  ast::TTToken(_, token::RPAREN))] => {
+                                  ast::TtToken(_, token::RPAREN))] => {
                         let first_set: &[ast::TokenTree] =
                             first_set.as_slice();
                         match first_set {
-                            [ast::TTToken(_, token::DOLLAR), ast::TTToken(_, _)] => {
+                            [ast::TtToken(_, token::DOLLAR), ast::TtToken(_, _)] => {
                                 let second_set: &[ast::TokenTree] =
                                     second_set.as_slice();
                                 match second_set {
-                                    [ast::TTToken(_, token::DOLLAR), ast::TTToken(_, _)] => {
+                                    [ast::TtToken(_, token::DOLLAR), ast::TtToken(_, _)] => {
                                         assert_eq!("correct","correct")
                                     }
                                     _ => assert_eq!("wrong 4","correct")
@@ -845,7 +845,7 @@ mod test {
         assert_eq!(json::encode(&tts),
         "[\
     {\
-        \"variant\":\"TTToken\",\
+        \"variant\":\"TtToken\",\
         \"fields\":[\
             null,\
             {\
@@ -858,7 +858,7 @@ mod test {
         ]\
     },\
     {\
-        \"variant\":\"TTToken\",\
+        \"variant\":\"TtToken\",\
         \"fields\":[\
             null,\
             {\
@@ -871,18 +871,18 @@ mod test {
         ]\
     },\
     {\
-        \"variant\":\"TTDelimited\",\
+        \"variant\":\"TtDelimited\",\
         \"fields\":[\
             [\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"LPAREN\"\
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         {\
@@ -895,14 +895,14 @@ mod test {
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"COLON\"\
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         {\
@@ -915,7 +915,7 @@ mod test {
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"RPAREN\"\
@@ -925,18 +925,18 @@ mod test {
         ]\
     },\
     {\
-        \"variant\":\"TTDelimited\",\
+        \"variant\":\"TtDelimited\",\
         \"fields\":[\
             [\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"LBRACE\"\
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         {\
@@ -949,14 +949,14 @@ mod test {
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"SEMI\"\
                     ]\
                 },\
                 {\
-                    \"variant\":\"TTToken\",\
+                    \"variant\":\"TtToken\",\
                     \"fields\":[\
                         null,\
                         \"RBRACE\"\
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1ed7baa13b4..ebca362b9d8 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -48,8 +48,8 @@ use ast::{StmtExpr, StmtSemi, StmtMac, StructDef, StructField};
 use ast::{StructVariantKind, BiSub};
 use ast::StrStyle;
 use ast::{SelfExplicit, SelfRegion, SelfStatic, SelfValue};
-use ast::{Delimiter, TokenTree, TraitItem, TraitRef, TTDelimited, TTSequence, TTToken};
-use ast::{TTNonterminal, TupleVariantKind, Ty, Ty_, TyBot};
+use ast::{Delimiter, TokenTree, TraitItem, TraitRef, TtDelimited, TtSequence, TtToken};
+use ast::{TtNonterminal, TupleVariantKind, Ty, Ty_, TyBot};
 use ast::{TypeField, TyFixedLengthVec, TyClosure, TyProc, TyBareFn};
 use ast::{TyTypeof, TyInfer, TypeMethod};
 use ast::{TyNil, TyParam, TyParamBound, TyParen, TyPath, TyPtr, TyQPath};
@@ -2526,8 +2526,8 @@ impl<'a> Parser<'a> {
     /// parse a single token tree from the input.
     pub fn parse_token_tree(&mut self) -> TokenTree {
         // FIXME #6994: currently, this is too eager. It
-        // parses token trees but also identifies TTSequence's
-        // and TTNonterminal's; it's too early to know yet
+        // parses token trees but also identifies TtSequence's
+        // and TtNonterminal's; it's too early to know yet
         // whether something will be a nonterminal or a seq
         // yet.
         maybe_whole!(deref self, NtTT);
@@ -2568,13 +2568,13 @@ impl<'a> Parser<'a> {
                     let seq = match seq {
                         Spanned { node, .. } => node,
                     };
-                    TTSequence(mk_sp(sp.lo, p.span.hi), Rc::new(seq), s, z)
+                    TtSequence(mk_sp(sp.lo, p.span.hi), Rc::new(seq), s, z)
                 } else {
-                    TTNonterminal(sp, p.parse_ident())
+                    TtNonterminal(sp, p.parse_ident())
                 }
               }
               _ => {
-                  TTToken(p.span, p.bump_and_get())
+                  TtToken(p.span, p.bump_and_get())
               }
             }
         }
@@ -2615,7 +2615,7 @@ impl<'a> Parser<'a> {
                 // Expand to cover the entire delimited token tree
                 let span = Span { hi: self.span.hi, ..pre_span };
 
-                TTDelimited(span, open, Rc::new(tts), close)
+                TtDelimited(span, open, Rc::new(tts), close)
             }
             _ => parse_non_delim_tt_tok(self)
         }