16 lines
421 B
Rust
Raw Normal View History

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