diff options
| author | bors <bors@rust-lang.org> | 2014-03-05 11:11:42 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-05 11:11:42 -0800 |
| commit | 8a55cd988f272ec70fc7d5adf6e61ed8ee6a8e78 (patch) | |
| tree | b486444019a55cb1981e2547fc83dedec186eafc /src/libsyntax/parse | |
| parent | db4f757367fcb0ad6e9644dc93218cf4a662e862 (diff) | |
| parent | 2302ce903d8e5a3b9fad345a3942c1a9c191cf17 (diff) | |
| download | rust-8a55cd988f272ec70fc7d5adf6e61ed8ee6a8e78.tar.gz rust-8a55cd988f272ec70fc7d5adf6e61ed8ee6a8e78.zip | |
auto merge of #12711 : edwardw/rust/mtwt, r=pcwalton
- Moves mtwt hygiene code into its own file - Fixes FIXME's which leads to ~2x speed gain in expansion pass - It is now @-free
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 1499a1b4c19..71ee32b4aad 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -11,6 +11,7 @@ use ast; use ast::{P, Ident, Name, Mrk}; use ast_util; +use ext::mtwt; use parse::token; use util::interner::{RcStr, StrInterner}; use util::interner; @@ -722,7 +723,7 @@ pub fn is_reserved_keyword(tok: &Token) -> bool { pub fn mtwt_token_eq(t1 : &Token, t2 : &Token) -> bool { match (t1,t2) { (&IDENT(id1,_),&IDENT(id2,_)) | (&LIFETIME(id1),&LIFETIME(id2)) => - ast_util::mtwt_resolve(id1) == ast_util::mtwt_resolve(id2), + mtwt::resolve(id1) == mtwt::resolve(id2), _ => *t1 == *t2 } } @@ -732,10 +733,10 @@ pub fn mtwt_token_eq(t1 : &Token, t2 : &Token) -> bool { mod test { use super::*; use ast; - use ast_util; + use ext::mtwt; fn mark_ident(id : ast::Ident, m : ast::Mrk) -> ast::Ident { - ast::Ident{name:id.name,ctxt:ast_util::new_mark(m,id.ctxt)} + ast::Ident{name:id.name,ctxt:mtwt::new_mark(m,id.ctxt)} } #[test] fn mtwt_token_eq_test() { |
