Skip to content

Commit 6aefaf2

Browse files
committed
typo-fixing and name-changes
1 parent 08b6057 commit 6aefaf2

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/libsyntax/ext/base.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ pub fn get_exprs_from_tts(cx: ext_ctxt, tts: ~[ast::token_tree])
414414
// a transformer env is either a base map or a map on top
415415
// of another chain.
416416
pub enum MapChain<K,V> {
417-
TEC_Base(~LinearMap<K,@V>),
418-
TEC_Cons(~LinearMap<K,@V>,@mut MapChain<K,V>)
417+
BaseMapChain(~LinearMap<K,@V>),
418+
ConsMapChain(~LinearMap<K,@V>,@mut MapChain<K,V>)
419419
}
420420

421421

@@ -424,12 +424,12 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
424424

425425
// Constructor. I don't think we need a zero-arg one.
426426
static fn new(+init: ~LinearMap<K,@V>) -> @mut MapChain<K,V> {
427-
@mut TEC_Base(init)
427+
@mut BaseMapChain(init)
428428
}
429429

430430
// add a new frame to the environment (functionally)
431431
fn push_frame (@mut self) -> @mut MapChain<K,V> {
432-
@mut TEC_Cons(~LinearMap::new() ,self)
432+
@mut ConsMapChain(~LinearMap::new() ,self)
433433
}
434434

435435
// no need for pop, it'll just be functional.
@@ -440,8 +440,8 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
440440
// lack of flow sensitivity.
441441
fn get_map(&self) -> &self/LinearMap<K,@V> {
442442
match *self {
443-
TEC_Base (~ref map) => map,
444-
TEC_Cons (~ref map,_) => map
443+
BaseMapChain (~ref map) => map,
444+
ConsMapChain (~ref map,_) => map
445445
}
446446
}
447447

@@ -450,8 +450,8 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
450450

451451
pure fn contains_key (&self, key: &K) -> bool {
452452
match *self {
453-
TEC_Base (ref map) => map.contains_key(key),
454-
TEC_Cons (ref map,ref rest) =>
453+
BaseMapChain (ref map) => map.contains_key(key),
454+
ConsMapChain (ref map,ref rest) =>
455455
(map.contains_key(key)
456456
|| rest.contains_key(key))
457457
}
@@ -473,8 +473,8 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
473473
match self.get_map().find (key) {
474474
Some(ref v) => Some(**v),
475475
None => match *self {
476-
TEC_Base (_) => None,
477-
TEC_Cons (_,ref rest) => rest.find(key)
476+
BaseMapChain (_) => None,
477+
ConsMapChain (_,ref rest) => rest.find(key)
478478
}
479479
}
480480
}
@@ -483,8 +483,8 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
483483
fn insert (&mut self, +key: K, +ext: @V) -> bool {
484484
// can't abstract over get_map because of flow sensitivity...
485485
match *self {
486-
TEC_Base (~ref mut map) => map.insert(key, ext),
487-
TEC_Cons (~ref mut map,_) => map.insert(key,ext)
486+
BaseMapChain (~ref mut map) => map.insert(key, ext),
487+
ConsMapChain (~ref mut map,_) => map.insert(key,ext)
488488
}
489489
}
490490

src/libsyntax/ext/expand.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn contains_macro_escape (attrs: &[ast::attribute]) -> bool{
195195
macro_rules! without_macro_scoping(
196196
($extsexpr:expr,$exp:expr) =>
197197
({
198-
// only evaluaate this once:
198+
// only evaluate this once:
199199
let exts = $extsexpr;
200200
// capture the existing binding:
201201
let existingBlockBinding =
@@ -421,8 +421,6 @@ pub fn core_macros() -> ~str {
421421
}";
422422
}
423423
424-
// could cfg just be a borrowed pointer here?
425-
426424
pub fn expand_crate(parse_sess: @mut parse::ParseSess,
427425
cfg: ast::crate_cfg, c: @crate) -> @crate {
428426
// adding *another* layer of indirection here so that the block

0 commit comments

Comments
 (0)