about summary refs log tree commit diff
path: root/src/libsyntax/ext/trace_macros.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-29 10:22:01 +0000
committerbors <bors@rust-lang.org>2014-10-29 10:22:01 +0000
commit3bc545373df4c81ba223a8bece14cbc27eb85a4d (patch)
tree6f2bc6000e1b8b10a1a74aedc57fa9d1f0fc565b /src/libsyntax/ext/trace_macros.rs
parent124508dea1caf213886e5e1a02d425cac8dd0b54 (diff)
parent665ad9c175f746b78c7eae81432b543d2e16c3c9 (diff)
downloadrust-3bc545373df4c81ba223a8bece14cbc27eb85a4d.tar.gz
rust-3bc545373df4c81ba223a8bece14cbc27eb85a4d.zip
auto merge of #18365 : bjz/rust/token, r=alexcrichton
[breaking-change]

(for syntax-extensions)

- Token variant identifiers have been converted to PascalCase for consistency with Rust coding standards
- Some free-functions in `syntax::token` have been converted to methods on `syntax::token::Token`:
    - `can_begin_expr`         -> `Token::can_begin_expr`
    - `close_delimiter_for`    -> `Token::get_close_delimiter`
    - `is_lit`                 -> `Token::is_lit`
    - `is_ident`               -> `Token::is_ident`
    - `is_path`                -> `Token::is_path`
    - `is_plain_ident`         -> `Token::is_plain_ident`
    - `is_lifetime`            -> `Token::is_lifetime`
    - `is_mutability`          -> `Token::is_mutability`
    - `to_binop`               -> `Token::to_binop`
    - `is_keyword`             -> `Token::is_keyword`
    - `is_any_keyword`         -> `Token:is_any_keyword`
    - `is_strict_keyword`      -> `Token::is_strict_keyword`
    - `is_reserved_keyword`    -> `Token::is_reserved_keyword`
    - `mtwt_token_eq`          -> `Token::mtwt_eq`
- `token::Ident` now takes an enum instead of a boolean for clarity
- `token::{to_string, binop_to_string}` were moved to `pprust::{token_to_string, binop_to_string}`
Diffstat (limited to 'src/libsyntax/ext/trace_macros.rs')
-rw-r--r--src/libsyntax/ext/trace_macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/trace_macros.rs b/src/libsyntax/ext/trace_macros.rs
index abf798ddacb..76f7b7b0d7b 100644
--- a/src/libsyntax/ext/trace_macros.rs
+++ b/src/libsyntax/ext/trace_macros.rs
@@ -12,7 +12,7 @@ use ast;
 use codemap::Span;
 use ext::base::ExtCtxt;
 use ext::base;
-use parse::token::{keywords, is_keyword};
+use parse::token::keywords;
 
 
 pub fn expand_trace_macros(cx: &mut ExtCtxt,
@@ -20,10 +20,10 @@ pub fn expand_trace_macros(cx: &mut ExtCtxt,
                            tt: &[ast::TokenTree])
                            -> Box<base::MacResult+'static> {
     match tt {
-        [ast::TtToken(_, ref tok)] if is_keyword(keywords::True, tok) => {
+        [ast::TtToken(_, ref tok)] if tok.is_keyword(keywords::True) => {
             cx.set_trace_macros(true);
         }
-        [ast::TtToken(_, ref tok)] if is_keyword(keywords::False, tok) => {
+        [ast::TtToken(_, ref tok)] if tok.is_keyword(keywords::False) => {
             cx.set_trace_macros(false);
         }
         _ => cx.span_err(sp, "trace_macros! accepts only `true` or `false`"),