2020-02-29 17:37:32 +00:00
|
|
|
use rustc_ast::tokenstream::TokenStream;
|
2020-01-11 16:02:46 +00:00
|
|
|
use rustc_ast_pretty::pprust;
|
2019-12-29 14:23:55 +00:00
|
|
|
use rustc_expand::base;
|
2012-12-23 22:41:37 +00:00
|
|
|
|
2019-09-03 14:43:25 +00:00
|
|
|
pub fn expand_log_syntax<'cx>(
|
|
|
|
_cx: &'cx mut base::ExtCtxt<'_>,
|
2019-12-31 17:15:40 +00:00
|
|
|
sp: rustc_span::Span,
|
2019-08-31 17:08:06 +00:00
|
|
|
tts: TokenStream,
|
2018-07-12 09:58:16 +00:00
|
|
|
) -> Box<dyn base::MacResult + 'cx> {
|
2020-06-24 14:45:08 +00:00
|
|
|
println!("{}", pprust::tts_to_string(&tts));
|
2011-08-08 21:17:33 +00:00
|
|
|
|
2014-03-18 12:14:08 +00:00
|
|
|
// any so that `log_syntax` can be invoked as an expression and item.
|
2018-12-20 00:57:48 +00:00
|
|
|
base::DummyResult::any_valid(sp)
|
2011-08-12 14:15:18 +00:00
|
|
|
}
|