15 lines
409 B
Rust
Raw Normal View History

use rustc_ast_pretty::pprust;
use rustc_expand::base;
use syntax::tokenstream::TokenStream;
2019-12-22 17:42:04 -05:00
pub fn expand_log_syntax<'cx>(
_cx: &'cx mut base::ExtCtxt<'_>,
sp: rustc_span::Span,
2019-12-22 17:42:04 -05:00
tts: TokenStream,
) -> Box<dyn base::MacResult + 'cx> {
println!("{}", pprust::tts_to_string(tts));
// 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)
}