summary refs log tree commit diff
path: root/src/libsyntax/ext/pipes
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-05-17 21:27:17 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-05-22 00:04:10 +1000
commit4045da9f4f7290b02bee52caa42504e4ce5406f7 (patch)
treeb29a484fe04e1c301fb33b9673f01087219bb71a /src/libsyntax/ext/pipes
parenteea265ea165cb0e6fa989a3712efd701456b265d (diff)
syntax/ext: modernise ext_ctxt to be CamelCase and use new.
Diffstat (limited to 'src/libsyntax/ext/pipes')
-rw-r--r--src/libsyntax/ext/pipes/ast_builder.rs4
-rw-r--r--src/libsyntax/ext/pipes/check.rs4
-rw-r--r--src/libsyntax/ext/pipes/liveness.rs4
-rw-r--r--src/libsyntax/ext/pipes/mod.rs4
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs42
-rw-r--r--src/libsyntax/ext/pipes/proto.rs4
6 files changed, 31 insertions, 31 deletions
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs
index a5148287258..1f38b14efbe 100644
--- a/src/libsyntax/ext/pipes/ast_builder.rs
+++ b/src/libsyntax/ext/pipes/ast_builder.rs
@@ -19,7 +19,7 @@ use ast;
 use ast_util;
 use codemap::{span, respan, dummy_sp, spanned};
 use codemap;
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::quote::rt::*;
 use opt_vec;
 use opt_vec::OptVec;
@@ -135,7 +135,7 @@ pub trait ext_ctxt_ast_builder {
     fn strip_bounds(&self, bounds: &Generics) -> Generics;
 }
 
-impl ext_ctxt_ast_builder for @ext_ctxt {
+impl ext_ctxt_ast_builder for @ExtCtxt {
     fn ty_option(&self, ty: @ast::Ty) -> @ast::Ty {
         self.ty_path_ast_builder(path_global(~[
             self.ident_of("core"),
diff --git a/src/libsyntax/ext/pipes/check.rs b/src/libsyntax/ext/pipes/check.rs
index 38e43d1ade5..c0b7f5bbb84 100644
--- a/src/libsyntax/ext/pipes/check.rs
+++ b/src/libsyntax/ext/pipes/check.rs
@@ -31,11 +31,11 @@ that.
 
 use ast;
 use codemap::span;
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::pipes::proto::{state, protocol, next_state};
 use ext::pipes::proto;
 
-impl proto::visitor<(), (), ()> for @ext_ctxt {
+impl proto::visitor<(), (), ()> for @ExtCtxt {
     fn visit_proto(&self, _proto: protocol, _states: &[()]) { }
 
     fn visit_state(&self, state: state, _m: &[()]) {
diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs
index 104e5f94d17..8d45e47d54e 100644
--- a/src/libsyntax/ext/pipes/liveness.rs
+++ b/src/libsyntax/ext/pipes/liveness.rs
@@ -37,12 +37,12 @@ updating the states using rule (2) until there are no changes.
 
 */
 
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::pipes::proto::{protocol_};
 
 use std::bitv::Bitv;
 
-pub fn analyze(proto: @mut protocol_, _cx: @ext_ctxt) {
+pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) {
     debug!("initializing colive analysis");
     let num_states = proto.num_states();
     let mut colive = do (copy proto.states).map_to_vec |state| {
diff --git a/src/libsyntax/ext/pipes/mod.rs b/src/libsyntax/ext/pipes/mod.rs
index 642f22e9736..46de21d1c0b 100644
--- a/src/libsyntax/ext/pipes/mod.rs
+++ b/src/libsyntax/ext/pipes/mod.rs
@@ -46,7 +46,7 @@ FIXME (#3072) - This is still incomplete.
 use ast;
 use codemap::span;
 use ext::base;
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::pipes::parse_proto::proto_parser;
 use ext::pipes::pipec::gen_init;
 use ext::pipes::proto::visit;
@@ -63,7 +63,7 @@ pub mod check;
 pub mod liveness;
 
 
-pub fn expand_proto(cx: @ext_ctxt, _sp: span, id: ast::ident,
+pub fn expand_proto(cx: @ExtCtxt, _sp: span, id: ast::ident,
                     tt: ~[ast::token_tree]) -> base::MacResult {
     let sess = cx.parse_sess();
     let cfg = cx.cfg();
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index 8a9c714e7e9..83b3572c85f 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -12,7 +12,7 @@
 
 use ast;
 use codemap::{dummy_sp, spanned};
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::pipes::ast_builder::{append_types, ext_ctxt_ast_builder, path};
 use ext::pipes::ast_builder::{path_global};
 use ext::pipes::proto::*;
@@ -21,27 +21,27 @@ use opt_vec;
 use opt_vec::OptVec;
 
 pub trait gen_send {
-    fn gen_send(&mut self, cx: @ext_ctxt, try: bool) -> @ast::item;
-    fn to_ty(&mut self, cx: @ext_ctxt) -> @ast::Ty;
+    fn gen_send(&mut self, cx: @ExtCtxt, try: bool) -> @ast::item;
+    fn to_ty(&mut self, cx: @ExtCtxt) -> @ast::Ty;
 }
 
 pub trait to_type_decls {
-    fn to_type_decls(&self, cx: @ext_ctxt) -> ~[@ast::item];
-    fn to_endpoint_decls(&self, cx: @ext_ctxt,
+    fn to_type_decls(&self, cx: @ExtCtxt) -> ~[@ast::item];
+    fn to_endpoint_decls(&self, cx: @ExtCtxt,
                          dir: direction) -> ~[@ast::item];
 }
 
 pub trait gen_init {
-    fn gen_init(&self, cx: @ext_ctxt) -> @ast::item;
-    fn compile(&self, cx: @ext_ctxt) -> @ast::item;
-    fn buffer_ty_path(&self, cx: @ext_ctxt) -> @ast::Ty;
-    fn gen_buffer_type(&self, cx: @ext_ctxt) -> @ast::item;
-    fn gen_buffer_init(&self, ext_cx: @ext_ctxt) -> @ast::expr;
-    fn gen_init_bounded(&self, ext_cx: @ext_ctxt) -> @ast::expr;
+    fn gen_init(&self, cx: @ExtCtxt) -> @ast::item;
+    fn compile(&self, cx: @ExtCtxt) -> @ast::item;
+    fn buffer_ty_path(&self, cx: @ExtCtxt) -> @ast::Ty;
+    fn gen_buffer_type(&self, cx: @ExtCtxt) -> @ast::item;
+    fn gen_buffer_init(&self, ext_cx: @ExtCtxt) -> @ast::expr;
+    fn gen_init_bounded(&self, ext_cx: @ExtCtxt) -> @ast::expr;
 }
 
 impl gen_send for message {
-    fn gen_send(&mut self, cx: @ext_ctxt, try: bool) -> @ast::item {
+    fn gen_send(&mut self, cx: @ExtCtxt, try: bool) -> @ast::item {
         debug!("pipec: gen_send");
         let name = self.name();
 
@@ -184,14 +184,14 @@ impl gen_send for message {
           }
         }
 
-    fn to_ty(&mut self, cx: @ext_ctxt) -> @ast::Ty {
+    fn to_ty(&mut self, cx: @ExtCtxt) -> @ast::Ty {
         cx.ty_path_ast_builder(path(~[cx.ident_of(self.name())], self.span())
           .add_tys(cx.ty_vars_global(&self.get_generics().ty_params)))
     }
 }
 
 impl to_type_decls for state {
-    fn to_type_decls(&self, cx: @ext_ctxt) -> ~[@ast::item] {
+    fn to_type_decls(&self, cx: @ExtCtxt) -> ~[@ast::item] {
         debug!("pipec: to_type_decls");
         // This compiles into two different type declarations. Say the
         // state is called ping. This will generate both `ping` and
@@ -240,7 +240,7 @@ impl to_type_decls for state {
         ]
     }
 
-    fn to_endpoint_decls(&self, cx: @ext_ctxt,
+    fn to_endpoint_decls(&self, cx: @ExtCtxt,
                          dir: direction) -> ~[@ast::item] {
         debug!("pipec: to_endpoint_decls");
         let dir = match dir {
@@ -302,7 +302,7 @@ impl to_type_decls for state {
 }
 
 impl gen_init for protocol {
-    fn gen_init(&self, cx: @ext_ctxt) -> @ast::item {
+    fn gen_init(&self, cx: @ExtCtxt) -> @ast::item {
         let ext_cx = cx;
 
         debug!("gen_init");
@@ -340,7 +340,7 @@ impl gen_init for protocol {
                            body.to_source(cx)))
     }
 
-    fn gen_buffer_init(&self, ext_cx: @ext_ctxt) -> @ast::expr {
+    fn gen_buffer_init(&self, ext_cx: @ExtCtxt) -> @ast::expr {
         ext_cx.struct_expr(path(~[ext_cx.ident_of("__Buffer")],
                                 dummy_sp()),
                       self.states.map_to_vec(|s| {
@@ -352,7 +352,7 @@ impl gen_init for protocol {
         }))
     }
 
-    fn gen_init_bounded(&self, ext_cx: @ext_ctxt) -> @ast::expr {
+    fn gen_init_bounded(&self, ext_cx: @ExtCtxt) -> @ast::expr {
         debug!("gen_init_bounded");
         let buffer_fields = self.gen_buffer_init(ext_cx);
         let buffer = quote_expr!(~::core::pipes::Buffer {
@@ -378,7 +378,7 @@ impl gen_init for protocol {
         })
     }
 
-    fn buffer_ty_path(&self, cx: @ext_ctxt) -> @ast::Ty {
+    fn buffer_ty_path(&self, cx: @ExtCtxt) -> @ast::Ty {
         let mut params: OptVec<ast::TyParam> = opt_vec::Empty;
         for (copy self.states).each |s| {
             for s.generics.ty_params.each |tp| {
@@ -395,7 +395,7 @@ impl gen_init for protocol {
                                .add_tys(cx.ty_vars_global(&params)))
     }
 
-    fn gen_buffer_type(&self, cx: @ext_ctxt) -> @ast::item {
+    fn gen_buffer_type(&self, cx: @ExtCtxt) -> @ast::item {
         let ext_cx = cx;
         let mut params: OptVec<ast::TyParam> = opt_vec::Empty;
         let fields = do (copy self.states).map_to_vec |s| {
@@ -436,7 +436,7 @@ impl gen_init for protocol {
             cx.strip_bounds(&generics))
     }
 
-    fn compile(&self, cx: @ext_ctxt) -> @ast::item {
+    fn compile(&self, cx: @ExtCtxt) -> @ast::item {
         let mut items = ~[self.gen_init(cx)];
         let mut client_states = ~[];
         let mut server_states = ~[];
diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs
index 7bf58bc6f32..12a0a0a24d6 100644
--- a/src/libsyntax/ext/pipes/proto.rs
+++ b/src/libsyntax/ext/pipes/proto.rs
@@ -10,7 +10,7 @@
 
 use ast;
 use codemap::span;
-use ext::base::ext_ctxt;
+use ext::base::ExtCtxt;
 use ext::pipes::ast_builder::{append_types, ext_ctxt_ast_builder, path};
 
 #[deriving(Eq)]
@@ -92,7 +92,7 @@ pub impl state_ {
     }
 
     /// Returns the type that is used for the messages.
-    fn to_ty(&self, cx: @ext_ctxt) -> @ast::Ty {
+    fn to_ty(&self, cx: @ExtCtxt) -> @ast::Ty {
         cx.ty_path_ast_builder
             (path(~[cx.ident_of(self.name)],self.span).add_tys(
                 cx.ty_vars(&self.generics.ty_params)))