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